Summary:
The current way to specify the OpenGL context attributes does no longer
scale as can be seen in D6344. There are too many different context
attribute sets and with every addition we grow lots of copied code. The
chances to introduce errors in that code which is difficult to debug are
very high. As can be seen in the glx backend which defines major 1,
minor 2, but it should be major 2, minor 1.
This change reworks this code by creating a builder class which contains
only an abstract definition of what needs to be in the attributes.
E.g. the version, whether it's robust and so on.
Now we can just have a list of possible attributes in a well described
way:
auto builder;
builder.setVersion(3, 1);
builder.setRobust(true);
All possible builders are added to a list and operated on in a for loop
which tries to creat a context. Once it succeeded it breaks the list.
In addition a debug statement is added which prints out the set of
options which went into the context.
So far this is only done for EGL, GLX can follow once D6344 is merged.
Test Plan: New unit test added, kwin_wayland OpenGL tests run and verified
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6396
Summary:
There was a regression introduced with bug fix eec6afe6 which added
a for pointer events only check also to doUpdateBlocking. Do to that
the edge blocking mechanism didn't work for touch edges.
BUG: 380476
FIXED-IN: 5.10.3
Test Plan:
verified with xwininfo that there is no longer a window when
in full screen. Activated edges through touch and pointer
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6304
Summary:
Based on earlier phab-request D2079. Adds the nvidia memory purge
extension to the robust context creation.
BUG: 344326
FIXED-IN: 5.10.3
Test Plan: Only compile tested as I don't have an NVIDIA card.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6344
This change is needed for Wayland screen recording apps to work
correctly. With this change the cursor is actually visible using GBM
buffer passing protocol.
Previously OpenGL backend did not support software cursor. If launching
in DRM/OpenGL mode with flicked on software cursor it only rendered
scene, but not the cursor image.
Differential Revision: https://phabricator.kde.org/D6186
The SceneOpenGLTest is transformed into a GenericSceneOpenGLTest which
can create either an OpenGL or an OpenGL ES scene based on env variable
which it sets in initTestCase. The env variable to set is passed as a
ctor argument from the SceneOpenGLTest and the new SceneOpenGLESTest.
This allows to easily run the same test code for both our OpenGL and
OpenGL ES compositor.
Summary:
Clients provide shadows as 9 images, which then get split into relevant quads.
To work out the full width we need the size of an item on the left, the middle and the right.
Some elements can be legitiamtely missing so to work out the width of the left edge we need to consider
all 3 of topleft,left,bottomleft.
Currently we checked both corners in case one was missing, but it's legitimate for both to be missing if the shadow
stretches the whole way.
BUG: 380825
Test Plan: Shadow on panel, rest looks the same
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: graesslin, mart, plasma-devel, kwin, #kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D6164
Summary:
By using AbstractClient instead of Client the method works also for
Wayland windows.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6275
Summary:
There were a few places where we still used Client instead of
AbstractClient. By changing this the placement also works for
Wayland windows in those cases.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6274
Summary:
A few areas in TabBox perform casts from Toplevel to Client. By casting
to Client instead of AbstractClient the Wayland windows are excluded.
This change addresses the problem by changing the casts where possible.
The only remaining cast to Client is for shading which is not (yet)
supported for Wayland windows anyway.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6273
Summary:
Screenedges only allows to switch desktop while moving window, not
while resizing. There was a special branch which only checked this for
X11 windows but not for Wayland windows.
This change removes a no longer needed cast from AbstractClient to Client
so that the check whether a window is getting resized works for both
X11 and Wayland clients. The cast was introduced in a time when
AbstractClient did not yet support the isResize method.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D6264
Summary:
There was a regression introduced in ScreenEdges when introducing the
activatesForPointer method. It considered the switch desktop on edge,
but not the special case of switch desktop when moving windows. Due to
that the edges did not activate when moving the window.
This change addresses the regression and extends the autotest to ensure
it's properly covered.
BUG: 380440
FIXED-IN: 5.10.3
Test Plan: Manual testing and extended auto test
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6257
Summary:
With qtbase 2b34aefcf02f09253473b096eb4faffd3e62b5f4 we do no longer get
events reported for the X11 root window. Our keyboard handling in effects
like PresentWindows and DesktopGrid relied on that.
This change works around the regression by calling winId() on
qApp->desktop() as suggested in the change. This is a short term solution
for the 5.10 branch.
This needs to be addressed properly by no longer relying on Qt in this
area. KWin already does not rely on Qt for Wayland in that area and is
able to compose the QKeyEvents. This should also be done on X11. It just
needs some more hook up code for xkb, but that's needed anyway to improve
modifier only shortcuts and friends.
BUG: 360841
FIXED-IN: 5.10.3
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6258
On the new CI system this test is failing. This might be a variation of
Qt 5.10 as I'm able to reproduce with Qt 5.10. From the investigation it
is not a bug in KWin. The test was failing due to a missing xcb_flush.
This happens when we go back to the event loop which seems not to happen
in proper timing. By adding a qWait we force to go to the event loop, the
flush is performed and the test passes.
Summary:
If the keymap cannot be created a few pointers in Xkb are null.
We should make sure to not call any xkbcommon functions on those
null pointers and instead use proper fallbacks.
This change introduces fixes for a few usages, but it's not unlikely
that there are more cases.
BUG: 381210
FIXED-IN: 5.10.3
Test Plan:
Autotest added for the condition of the bug, which does
not crash any more. Just starting the test found a few more crash
cases.
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6260
Summary:
the morphingpopup effect was working with notifications only
in wayland. looking at what the codepath is, the signal
geometryShapeChanged was not emitted as it was checking for
resized, but it's supposed to come at every geometry
update, not only resizes
Test Plan:
notification with D6216 are correctly animated, other
animated things liketooltips are unaffected
Reviewers: #plasma, #kwin, graesslin, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D6229
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:
So far KWin started to filter out the escape key as soon as it gets
pressed. This was done by unsetting keyboard focus. The idea was to
reset keyboard focus when it is only a short press and that then the
keyboard state is correct for the application. But in practice this
does not work. The only application currently supporting pointer
constraints (Xwayland) does not do anything on a key which is pressed
when gaining keyboard focus. The result is escape not working in
pointer constrained Xwayland windows.
This change addresses this problem by changing the interaction to only
unset keyboard focus when our break constraints condition is met. This
should also result in the application not handling the key release, but
it means it gets the key press. Unfortunately I don't have a good way
to test.
BUG: 378452
Test Plan: None
Reviewers: #kwin, #plasma
Subscribers: plasma-devel, kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D5488