If a Wayland protocol deals with regions, they will be exposed as
QRegion objects in public API. Therefore, it makes sense to make
RegionInterface private as it's an implementation detail and it's
not intended to be used in public api.
The corresponding test was dropped because the CompositorInterface
no longer emits a signal to indicate that a wl_region has been created.
It should be also noted that wl_region stuff is already tested via
other means, e.g. surface damage, etc.
testError expects that the compositor will post a protocol error if the
client tries to create several plasma shell surfaces for the same wayland
surface.
This is a minor regression introduced with the refactor of the
KeyboardInterface. We need to update pressed key status even if there is
no focused surface, otherwise some keys may get stuck in the pressed
state.
This improves the readability of the setFocusedSurface() method in the
KeyboardInterface class. Currently, it's easy to overlook that the
sendEnter() function also sends modifiers.
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.
PlasmaWindowInterface is a "Server-managed multicasting resources". We
no longer need our wrapper to outlive objects so we can tidy that up.
It's weird to have a method call to an object delete the object, so
memory management is moved to the caller to be consistent.
The protocol spec indicates that the compositor has to accumulate seat
capabilities and post a protocol error if a client requests an input
device and the seat has never had the corresponding capability.
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.
During a drag the source can disappear at any time. The other client
will be notified, but it may have actions in flight.
Other methods were guarded but not data_offer_finished.
Currently, the compositor is supposed to pass the position of the touch
point to the touchDown() function and in return get its unique global
id. The id can be be passed to subsequent touchMotion() and touchUp().
The compositor is responsible for mapping between libinput slots and
internal touch point ids.
The mapping step is unnecessary and adds in some complexity as the input
code now has to keep the mapping table up to date.
This change makes the touch API more convenient to use by making
relevant functions take touch ids that are assigned by the compositor.
Usually, compositor would use libinput_event_touch_get_seat_slot() to
get touch ids.
It also allows introducing event objects that can be useful later in the
future.
This is a copy of the code from Qt5.15 with some backported patches from
development branch of Qt.
One of the upcoming fixes introduces new API, which is why we can't rely
on distro packaging.
The cmake macro is mostly copied from ECM, but set to rebuild generated
code when the scanner changes.
The following order of events are legal:
Typically order is:
- server announces a new output
- client binds to a new output
- server updates the surface to be on new output
But we can have events occur in the following order:
- server announces a new output
- server updates the surface to be on new output
- client binds to a new output
At which point when we update the surface there is no ID to tell the
client which output the surface is on.
This patch watches for clients binding to output and updates
appropriately.
Be more explicit about the types, prefer passing semantically correct
parents and keep track of the pads from the object rather than relying
on them being initialised properly.
We send modifiers to the active client when they change, and when we
focus an existing client we send the cached state.
For this reason it's important we always update our internal store of
modifiers regardless of whether a surface is currently active.
Unit test is adopted accordingly.
BUG: 429930