Summary:
Rename ShellClient to XdgShellClient in order to reflect that it
represents only xdg-shell clients.
Test Plan: Compiles, tests still pass.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23589
Summary:
Drop xdg-shell v5 support since this protocol is obsolete and all popular
wayland compositors already did that.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23573
Summary:
This change removes all traces of wl-shell in the test suite. That's a
prerequisite for dropping wl-shell support in KWin.
Given that wl-shell and xdg-shell are not interchangeable, some tests
were removed and initialization sequence in some tests was adjusted.
The most notable change is ensuring that each plasmashell window sets
its role and initial position before committing the surface. Setting
those properties before the first surface commit is important because
our window placement code needs to know window type in order to
avoid maximizing panels, popups, etc.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D23561
Summary:
Create output devices in virtual backend. For that the setVirtualOutputs call
can only come after the Wayland server has been initiliazied such that the
display exists to create the output and output device interfaces. Tests have
been adjusted for that.
Test Plan:
```
98% tests passed, 3 tests failed out of 148
Total Test time (real) = 362.97 sec
The following tests FAILED:
33 - kwin-testInternalWindow (Failed)
39 - kwin-testPointerInput (Failed)
101 - kwin-testMoveResize (Failed)
```
Failing of these tests looks unrelated to the change.
Reviewers: #kwin
Subscribers: kwin
Tags: #kwin
Maniphest Tasks: T11459
Differential Revision: https://phabricator.kde.org/D23477
Summary:
This patch aims at improving the Toplevel, internal window and decoration
focus tracking.
In detail the goals are:
* Clean tracking of beneath and focus Toplevel as well as decoration and
internal windows. Splitting this up in well defined sub routines.
* Minimal find Toplevel operations on window stack.
* Reduce code duplication in pointer and touch child classes.
* Reuse tracking in drag operations.
* Allow direct usage of Wayland input interfaces for decoration and internal
windows in the future.
* Update touch focus on external events like VD switches correctly.
Test Plan: Manually and existing autotests.
Reviewers: #kwin
Subscribers: kwin, zzag
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15595
Summary:
Same is done on X11 (see Client::updateMouseGrab), so we should have this
on Wayland as well.
Also adding the pointer confinement restriction for modifier + wheel.
Test Plan: Run new and adjusted testcases with and without the change
Reviewers: #kwin, #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D16025
Summary:
If the pointer is constrained all mouse events should go to the window.
Also our Alt+click. To use Alt+click nevertheless one can just unconfine
the window.
CCBUG: 399375
Test Plan: Run the adjusted autotest before and after change
Reviewers: #kwin, #plasma
Subscribers: kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D15982
Summary:
With 2694839099, 0bd5eff862 and f0ba436c72 it is now possible to
unconstrain a pointer by killing the client or deactivating the window, for
example by switching the window via the TabBox.
A user should always be able to do it therefore without needing to explicitly
break the pointer constrain as in the past with the Esc key.
Therefore remove the functionality and also remove the OSD announcing it,
which was often shown at the wrong time.
Test Plan: Manually and auto test adapted.
Reviewers: #kwin, #vdg, hein
Reviewed By: hein
Subscribers: ngraham, hein, kwin
Tags: #kwin
Maniphest Tasks: T8923
Differential Revision: https://phabricator.kde.org/D15234
Summary:
This patch changes KWin's pointer constraining behavior by only allowing
constraints if the surface has keyboard focus. In case the client activation
state changes, it rechecks it.
Test Plan:
Manually with the pointer constraints test application and opening the
launcher by pressing meta. Also amended autotest.
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, davidedmundson, kwin
Tags: #kwin
Maniphest Tasks: T8923
Differential Revision: https://phabricator.kde.org/D13492
Summary:
A client might delete its pointer lock/confinement object. This is supposed to
directly remove the pointer lock/confinement in KWin, but did not explicitly
until now.
BUG: 388885
Test Plan:
Tested manually with Neverball, Nexuiz and the new pointer constraints test
application. The pointer constraints autotest is also appended.
Reviewers: #kwin, davidedmundson
Reviewed By: #kwin, davidedmundson
Subscribers: davidedmundson, graesslin, kwin
Tags: #kwin
Maniphest Tasks: T8923
Differential Revision: https://phabricator.kde.org/D13466
Summary:
This matches the DRM backend more closely and allows mid-test removal and
addition of virtual outputs with different properties in the future.
Test Plan: Before and after 93% tests passed.
Reviewers: #kwin, graesslin
Reviewed By: #kwin, graesslin
Subscribers: graesslin, kwin, #kwin
Tags: #kwin
Differential Revision: https://phabricator.kde.org/D11351
Summary:
Adds XDGV6 support for the kwin side.
Popup placement support is limited to the stuff v5 had,
a simple offset, rather than the awesome new positioner.
But Qt doesn't make use of it yet either.
Also ideally we should do all the positioning before sending the first
configure, but again Qt doesn't actually do anything with that anyway.
Also integrate pinging clients
Test Plan: gtk3-demo works nicely.
Reviewers: #plasma, graesslin, mart
Reviewed By: #plasma, graesslin
Subscribers: mart, graesslin, kwin, plasma-devel, #kwin
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D6591
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
Summary:
This is a preparation step for no longer creating a socket in the tests
and slightly simplifies the init test code.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3575
Summary:
There are two types of constraints supported:
1. Pointer confinement
2. Pointer locking
In the case of confinement the pointer is confined to a given region of
the surface. This is comparable to general operation where the pointer
is confined to the screen region.
In the second case the pointer gets locked. That means it cannot move at
all. No further position updates are provided, only relative motion
events can go to the application. There is a hint about cursor position
update on unlock which is not yet implemented in KWayland::Server, thus
also not in this change.
The implementation in KWin grants the requests for pointer constraints
when the pointer enters the constrained region, either by pointer
movement or by e.g. stacking order changes. There is no confirmation
from user required to enter that mode. But we want to show an OSD when
the pointer gets constrained, this is not yet implemented, though.
Breaking an active constraint is relatively easy. E.g. changing the
stacking order will break the constraint if another surface is under the
cursor. Also (in case of confinement) moving the pointer to an
overlapping window breaks the confinement. But as soon as one moves the
pointer back to the window a constraint might get honoured again.
To properly break there is a dedicated event filter. It listens for a
long press of the Escape key. If hold for 3sec the pointer constraint is
broken and not activated again till the pointer got moved out of the
window. Afterward when moving in the pointer might activate again.
The escape filter ensures that the key press is forwarded to the
application if it's a short press or if another key gets pressed during
the three seconds. If the three seconds way fires, the later escape
release is not sent to the application.
This basic interaction is also ensured through an added auto test.
This change implements T4605.
Test Plan: Added auto test and nested KWin Wayland with D3488
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D3506