While a stylus is in proximity we want to show its cursor. In this commit
it only gets shown on move because for a still unknown reason the position
is out of date before the first move event.
BUG: 443921
Add `tabletToolEvent()` to DecorationEventFilter class so it can handle
tablet events.
Add `tabletToolEvent()` to MoveResizeFilter class to avoid incorrect
titlebar highlight after a window is resized by using a stylus.
Add `tabletToolEvent()` to WindowActionInputFilter class so window focus
can be changed by clicking on the window content area when using a stylus.
Add `update()` to `TabletInputRedirection::tabletToolEvent()` to enable
switching window focus by using a stylus.
BUG: 432104
The main motivation behind this change is to prepare input abstractions
for virtual input devices so the wl_seat can properly advertise caps or
the cursor getting properly mapped/unmapped when a fake pointer is
added/removed on a system without a hardware mouse connected.
With this, there are three abstractions - InputDevice, InputBackend, and
InputRedirection.
An InputDevice represents an input device such as a mouse, a keyboard, a
tablet, etc. The InputBackend class notifies the InputRedirection about
(dis-)connected devices. The InputRedirection manages the input devices.
Such design allows to unify the event flow for real and virtual input
devices.
There can be several input backends active. For example, the libinput
backend and an input backend that provides virtual input devices, e.g.
libeis or org_kde_kwin_fake_input.
Currently, input events can flow directly to input device handlers and
sometimes they go through the InputRedirection, which simply forwards
them to the corresponding input device handler.
API-wise it's odd to require absolute position with relative pointer
moves.
This cleans up some of InputRedirection code by making it simply forward
pointer input events from input devices to the pointer input device
handler, which knows better what to do with the delta value.
The pointer input device handler will compute the absolute position based
on the specified delta value, but it could also do something else, e.g.
not move the pointer at all if it's locked, etc.
Whether relative pointers are supported doesn't depend on the input
backend. This change moves the instantiation of the extension to the
WaylandServer class to make code more consistent.
When libinput tears down, it may access the Session object. This change
re-jitters the shut down logic so the Session object is guaranteed to be
valid when libinput stuff gets destroyed.
BUG: 442104
libinput will send release and proximity out events after the device is
disconnected.
This just takes into account that tablet might be nullptr.
BUG: 442573
An AbstractDragTarget is introduced. This contains either the DataDevice we are
dragging to or an Xwl bridge.
We set this on Seat along with the active surface.
In future this also allows getting rid of the move filter.
This lays down some groundwork for realtime gestures in Wayland,
so that gestures that are 1:1 with user motion on a touchpad are
now possible to implement.
Due to earlier commits, this is mostly just glue code to make a
convenient API.
Gestures implemented with this API are four-finger gestures, to
avoid conflicting with apps that may use two or three-finger
gestures.
toplevel.h is included in many places. Changing virtualdesktops.h may
trigger rebuild of all kwin.
With this change, only cpp files that use virtualdesktops.h will need to
be recompiled.
The main motivation behind the split is to simplify client buffer code
and allow adding new features easier, for example referencing the shm
pool when a shm buffer is destroyed, or monitoring for readable linux
dmabuf file descriptors, etc.
Also, a referenced ClientBuffer cannot be destroyed, unlike the old
BufferInterface.
The tablet protocol offers us the cursor in a surface. This patch makes
sure we connect to the surface so that we can also refresh the
representation if the client submits a change.
BUG: 437777
The decorationPressId never gets reset as the decoration isn't below the
touch point anymore after the quick tile, so if we have no decoration
under the touch point reset the decorationPressId to -1.
CCBUG: 430560
This is to improve code readability and make it easier to differentiate
between methods that are used during interactive move-resize and normal
move-resize methods in the future.
So far we were only tracking the first touch point, meaning that if 2
touch points were applied to the internal window and removed one, the
second's events would then be sent to Wayland, which would assert since
it didn't know it had been pressed in the first place.
This fixes InternalWindowTest::testTouch
Currently, the Workspace has no any api to constrain one window above
another. This results in having hacks such as keepDeletedTransientAbove()
This change introduces a basic api to constrain a given window above
another. It can be used for ensuring that transient windows are placed
above their parents. It also can be used for stacking the outline window
below the move-resize window.
Internal windows may also have transient parents. Because of that, this
change makes the workspace add internal clients to the stacking order by
default. The good thing about it is that it allows us unify some input
related code for "external" windows and internal windows.
We want to update the input focus only if the pointer is moved. Due to
that, AbstractClient::enterEvent() checks the last seen pointer position
to decide whether the window needs to be focused.
The issue is that when the pointer moves from a decoration to a surface,
the cached pointer position will be updated to the current pointer
position, and thus the check in AbstractClient::enterEvent() will fail.
We need to update the cached pointer position only if there is a focused
decoration.
In this context, the cursor will (almost) always be defined as we set it
as soon as an application is bound to it. We need to show the default
cursor if set_cursor hasn't been called yet. The way to do that is to
check whether the serial is still.
Re-use Qt's implementation of handling non-Latin layouts here
For full ASCII range support (Alt+`, etc.) Qt needs to be patched still,
see QTBUG-90611
BUG: 375518