This change renames methods that are used by the compositor to notify the
seat about input events.
There isn't anything special about the proposed naming scheme, for what
it is worth, it was established in weston. "notify" methods are used to
notify kwaylandserver about something, and "send" methods actually send
relevant events to wayland clients.
This rewrites the wl_seat protocol implementation to adhere to the new
design principles.
Effectively, we've been supporting wl_seat v7 so the version was also
bumped from 5 to 7.
With this design, a single PointerInterface manages multiple wl_pointer
objects. This makes the API tidier and allows implementing things such as
keyboard grabs more easier.
In addition to that, the PointerInterface doesn't inject its own frame
events anymore. It's up to the compositor to decide when it has to be
sent. However, the PointerInterface may still send a frame event if the
pointer focus changes.
Besides re-writing the pointer interface, this change, unfortunately,
also affects the implementation of pointer-gestures and relative-pointer
protocols because previously they were coupled to individual instances
of PointerInterface.
The main reason why we have factory methods is that up to some point,
kwayland had its own signal to indicate when globals have to be removed.
Now that all globals add destroy listeners for the wl_display object,
we don't have that signal. Most factory methods are equivalent to doing
new T(display).
Besides adding unnecessary boilerplate code, another reason to get rid
of the factory methods is to reduce the amount of merge conflicts. If
several persons work on implementing wayland protocols at the same time,
sooner or later someone will have to resolve merge conflicts in Display.
libwayland-server allows the wl_display accept client connections on
more than one socket. We currently don't listen on multiple sockets,
but it would be nice if Display supported such operation mode.
One of the most disappointing things when writing autotests is dealing
with a race condition where destructor requests are processed after all
globals have been destroyed.
With this change, the Display object will destroy all clients and their
resources before destroying the wl_display object. The good thing about
doing so is that shut down logic becomes simple. We don't have to assume
that wl_resource objects can outlive their wl_global objects, etc. The
bad thing is that it exposed a couple of pre-existing latent bugs in the
data device and the xdg foreign code.
closesplasma/kwayland-server#2
Summary:
Implement support for locked pointer cursor hints. Cursor hints can be
retrieved by the compositor either continuously by connecting to the
cursorHintChanged signal or only when needed. In the later case the
compositor must connect to the aboutToUnbound signal of the locked pointer
interface in order to fetch the last hint before the interface is unbound.
Test Plan: Autotest added.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: davidedmundson, kde-frameworks-devel
Tags: #frameworks
Maniphest Tasks: T4692
Differential Revision: https://phabricator.kde.org/D14175
Summary:
Several signal spies, which were supposed to fail, were waiting for the
default 5 seconds, which is most often unnecessary long.
This patch sets a time limit of 500ms in suitable cases. Reduces for me
the total test time by 40%.
Test Plan:
Before (with fixed seat and selection tests):
98% tests passed, 1 tests failed out of 45
Total Test time (real) = 173.31 sec
The following tests FAILED:
19 - kwayland-testWindowmanagement (Failed)
After:
98% tests passed, 1 tests failed out of 45
Total Test time (real) = 102.12 sec
The following tests FAILED:
19 - kwayland-testWindowmanagement (Failed)
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: kde-frameworks-devel
Tags: #frameworks
Differential Revision: https://phabricator.kde.org/D14184
The setRegion call allows a null region. This means nullptr is an
allowed value which can be passed to ConfinedPointer::setRegion and
LockedPointer::setRegion.
In that case we crash if we try to convert the Region into a wl_region.
Thus add proper nullptr check, just like in
PointerConstraints::lockPointer and ::confinePointer.
Auto test adjusted to cover the condition.
Summary:
The pointer constraints protocol is an unstable protocol and thus
the implementation follows the semantics of unstable protocols.
The protocol allows to create a constraint on the pointer - either a
lock or a confinement on a surface. Those are not activated at once, but
when the compositor actively grants it.
During lock no further pointer motion is emitted, during confinement the
pointer is kept in a certain area.
This implements T4451.
Reviewers: #plasma_on_wayland
Subscribers: plasma-devel
Tags: #plasma_on_wayland
Differential Revision: https://phabricator.kde.org/D3466