With the recent patches AMS should be stable enough for daily use. It was
tested by several people in the last week without reporting back any problems.
So make it the new default on master.
Leave an env variable for now to deactivate it, in case something bad happens.
Reviewers: #kwin, graesslin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5934
Summary:
As noted by Thomas L we're casting the scaleFactor to an int far too
early, which in the worst case means we end up with Aurorare themes not
rendering.
This moves the rounding to where it's used per border.
BUG: 380524
Test Plan:
Forced Xft.DPI to 95 with xrdb. Confirmed that it was broken
Applied this patch. Got decoration again
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: mart, rikmills, plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6099
Summary:
I keep having to re-add this patch locally to see which config is
actually in play.
Test Plan: Compiles
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5795
This patch makes the AMS execution path work with the new DrmCrtc and
DrmBuffer structure and solves major issues about:
* VT switching
* DPMS
* Hot plugging
* Logout
* Memory leaks
Test Plan:
Tested with Gl and QPainter.
Reviewers: #kwin
Subscribers: kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5191
Split off GBM based buffers to a separate file, which gets only included,
when GBM is available.
Note, that this also removes the gbmCallback, since already before this
patch we did delete the buffers always without it.
The plan is to later use this file for via GBM directly imported Wayland
buffers as well.
Test Plan:
Tested with Gl and QPainter backends.
Reviewers: #kwin
Subscribers: kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5179
To get an image from KWin to the screen in the DRM pipeline we combine a CRTC,
an encoder and a connector. These objects are static in the sense, that they
represent real hardware on the graphics card, which doesn't change in a
session. See here for more details:
https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-kms.html
Until now we used DrmOutput as the main representation for such an active
rendering pipeline. I.e. it gets created and destroyed on hot plug events of
displays. On the other side we had no fixed representation of the static kernel
objects throughout the lifetime of KWin. This has several disadvantages:
* We always need to query all available static objects on an hot plug event.
* We can't manipulate the frame buffer of a CRTC after an output has been
disconnected
* Adding functionality for driving multiple displays on a single CRTC (i.e.
cloning) would be difficult
* We can't destroy the last frame buffer on display disconnect because the CRTC
still accesses it and have therefore a memory leak on every display disconnect
This patch solves these issues by storing representations of all available CRTC
and Connector objects in DrmBackend on init via DrmCrtc and DrmConnector
instances. On an hotplug event these vectors are looped for a fitting CRTC and
Connector combinations. Buffer handling is moved to the respective CRTC
instance. All changes in overview:
* Query all available CRTCs and Connectors and save for subsequent hotplug
events
* Fix logic errors in `queryResources()`
* Move framebuffers, buffer flip and blank logic in DrmCrtc
* Remove `restoreSaved()`. It isn't necessary and is dangerous if the old
framebuffer was deleted in the meantime. Also could reveal sensitive user
info from old session.
Test Plan:
Login, logout, VT switching, connect and disconnect external monitor, energy
saving mode.
Reviewers: #kwin
Subscribers: kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5118
Summary:
To have touch events working we need to do memory layout changes on the
xcb events. This is fine for identifying the touch events which should
trigger the screen edge. But when passed on to Qt to have QtQuick windows
(e.g. Alt+Tab) handle the touch events, this results in a problem:
Qt itself does also the memory movement and then the movement is double
and touch events break.
To prevent this problem an RAII class is added which moves the memory in
the ctor and moves it back in the dtor. So during KWin's processing it
has the right memory layout and later on in Qt's processing it has the
proper "wrong" layout which Qt can fix again.
Test Plan: Touch events in Alt+Tab work
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5549
Summary: Basically just a copy and paste from the relevant Qt Wayland
parts.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5172
Summary: We need to set the viewport so that we scale from device pixels to global compositor space.
Test Plan:
Ran kwin_wayland properly on my laptop without setting KWIN_COMPOSE.
Most things worked.
Reviewers: #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3504
Summary:
Another regression from enabling touch support on X11.
The approach window for pointer input gets unmapped as soon as the mouse
enters the window. This ensures that mouse motion events are not stolen
from other applications. But with the touch events we did not even react
on the enter event if it's not activated for pointer. The result was an
area around the screenedge being blocked for pointer input.
This change only creates and maps the approach window if the edge is
activated for pointer input.
BUG: 378951
Test Plan:
Activated edges through pointer and touch, reconfigured and tested
motion events
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5528
Summary:
With the TabBox I observed the following issue:
1: trigger TabBox through screen edge
2: exit TabBox
3: trigger TabBox again through screen edge
Actual behavior: in step 3 the GUI does not show. If now using Alt+Tab
to show the TabBox the gui shows, but through screen edge it stays
broken.
Investigation showed that the difference is a direct show in screen edge
case and a delayed show in Alt+Tab case. Futher investigation shows that
an invalid geometry gets requested in the broken case. While this might
indicate an issue in another area it makes sense to protect KWin
internally against it and not to break rendering.
Thus this change ensures that a valid FBO does not get replaced by an
invalid sized FBO.
Test Plan:
Tested that Alt+Tab works correctly when triggered through
edge
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5438
Summary:
Grabbing the touch events seems to cause issues. It seems to also grab
pointer events from touchpad and breaks touch input on other events.
Also testing shows that we don't need it and get touch ownership events
for our screenedge windows reported.
BUG: 378951
Test Plan: Triggered touch screen edge, normal system usage on X11
Reviewers: #plasma, #kwin
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5520
Summary:
Libdrm 2.4.78 introduces a version 2 and if KWin gets built against it
our code would break. Given that this change is for Plasma/5.8 branch.
Closes T5839
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Maniphest Tasks: T5839
Differential Revision: https://phabricator.kde.org/D5380
Summary:
Cursors are drawn low level, so need to go from global compositor space
to device space
(multiplied by the out scale)
Test Plan: Elements interacted underneath where the mouse was
Reviewers: #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3499
Test Plan:
For the first time, actually plugged in my high DPI laptop.
Tested both 1x and 2x windows on 2 real displays one high DPI, one normal
Reviewers: #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3498
Summary:
In theory we shouldn't need to scale input, however when in windowed
mode
we need to convert the host into output normal.
Reviewers: #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3496
Summary:
Provides a virtual method in Screens where backends can supply the scale
of each screen, this is then set on each output.
For the X windowed backend this value is taken from a command line
parameter.
Test Plan:
Ran windowed mode with --scale 1 and 2
then kate --platform=wayland from another screen.
On the latter case UI elements were scaled up correctly
Reviewers: #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D3159
Summary:
This change extends the XInputEventFilter to also listen for all touch
events on the root window.
The touch points are passed to the new gesture recognizer in screenedges.
Please note that I'm not using X11 and have hardly tested this change in
real world. To our X11 users with touch screen support: please test!
Test Plan: Can activate and deactivate the screenedge.
Reviewers: #plasma, #kwin
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D5137
Summary:
Each Edge creates a SwipeGesture for touch activation. The swipe needs to
be a single finger starting from the edge into the screen for at least
20 %. The SwipeGesture and GestureRecognizer is extended to support the
use cases of the touch screen edge swipe.
New features supported by the gesture system are:
* minimum and maximum position
* a minimum delta for the swipe
* progress signal based on the minimum delta
* starting a swipe with a start point
The Edge has the progress signal connected to its approach signal, thus
visual feedback is provided through the screen edge effect.
The screen edge system supports touch only for the edges (corners are
too difficult to activate on touch screens). At the moment the following
features are supported:
* screen edge show/raise of windows (e.g. auto hidden panels)
* trigger the configured action
* trigger the configured callback function (e.g. script)
In future it might make sense to add a touch specific configuration
action to support different actions for screen edges activated by mouse
and touch.
BUG: 370323
Test Plan:
configured a screen edge and triggered through touch,
added an auto-hiding panel and triggered through touch
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D5106