Commit graph

15 commits

Author SHA1 Message Date
Aleix Pol Gonzalez
6c4ded2034 input: Allow different surfaces to be interacted in parallel by touch
While on pointers and keyboards the focus patterns follows rather
naturally, on touch screens it doesn't so much.
This change adapts our touch infrastructure to allow for multiple
surfaces to be issued touch events without forcing all interactions into
the same one.

Signed-off-by: Victoria Fischer <victoria.fischer@mercedes-benz.com>
2024-08-28 09:36:51 +00:00
David Edmundson
99f2cd2f51 Revert "wayland: Revert send pointer leave on drag"
Now we have server-side cursor icons, we can send the pointer leave.

This reverts commit 9302e84b95.
2024-08-23 09:42:05 +00:00
David Redondo
9e2326d3ac Generate wayland code with PRIVATE_CODE 2024-08-15 14:16:11 +00:00
David Redondo
31018c000b wayland: Check serial instead of focus for changing selections
Clients can have valid reasons to change the selection when the
same user action that also caused the selection request
to lose keyboard focus. This is notbaly the case for menus
created from a Plasma panel which itself will not take focus
but when clicking on action it only triggers after the menu
is closed.
This also matches what weston and sway do.
BUG:490803
2024-08-06 12:54:00 +00:00
David Edmundson
9302e84b95 wayland: Revert send pointer leave on drag
This was changed to match the behaviour of other compositors.
However what kwin did before is more sensible.

Sending a leave event breaks cursor updates by design. See
https://gitlab.freedesktop.org/wayland/wayland/-/issues/444
2024-03-11 11:32:35 +00:00
David Edmundson
5386360928 wayland: Send wl_pointer leave before data_device enter
SeatInterface currently has a separation of kwin's focus scope to
pointer input with early return guards in notifyPointerEnter and
notifyPointerLeave where clients don't get pointer events.

However we don't update the initial state when a drag is started, this
patch notifies sends a pointer leave to the new drag target before the
data_device enter so things are consistent.

This also brings it in line with Weston and Mutter.

notifyPointerLeave has it's early return removed as for wayland windows
as we know nothing will have pointer focus.
2024-02-14 12:39:32 +00:00
Vlad Zahorodnii
6510fe6e5d scene: Fix SurfaceItem::bufferTransform()
The wayland spec is not quite clear about the transforms, but the buffer
transform indicates a transform from wl_surface to wl_buffer or compositor
global coordinate space to composited buffer.

On the other hand, SurfaceItem assumes that the order is vice versa.
2024-01-09 17:42:09 +00:00
Vlad Zahorodnii
9039612c20 core: Rename OutputTransform enums 2024-01-09 17:42:09 +00:00
Aleix Pol Gonzalez
df3e894c1a wayland: Install display.h
It's needed to properly access KWin::effects->waylandDisplay().

Signed-off-by: Georg Leugner <georg.leugner@mbition.io>
2024-01-08 23:06:43 +00:00
Jonathan Esk-Riddell
cc4eac4c85 Port to renamed kwayland
https://invent.kde.org/plasma/kwayland/-/merge_requests/107  use renamed kwayland
2023-11-23 19:34:24 +00:00
Vlad Zahorodnii
79d5a70c01 wayland: Make SurfaceInterface::{frameRendered,takePresentationFeedback} not touch subsurface tree
This gives us greater flexibility and in general more cleaner code.
2023-11-14 14:58:40 +00:00
Xaver Hugl
15d6d8c336 wayland/surface: add the output a surface is on the most 2023-11-07 20:23:06 +01:00
Vlad Zahorodnii
d7b1661e08 Merge libkwineffects into libkwin
libkwineffects was introduced when kwin used to be an executable. It
provided an api to implement effects and shielded from the technical
quirks in kwin.

Over the time, kwin internals had been split and abstractions were
refactored so they can be consumed in scripts or plugins. Besides that,
new ways to implement extensions have been introduced, which use
kwin's internal abstractions.

On the other hand, effects continue using libkwineffects specific apis.
This has a few issues: qtquick effects use both apis and it bites us,
duplicating same apis.

The best solution so far is to merge libkwineffects with libkwin, and
replace libkwineffects abstractions with libkwin abstractions, e.g.
EffectScreen -> Output, etc. This change takes care of adjusting libs.

Obviously, the main disadvantage of doing so is that binary effects
have to be recompiled every time new libkwin is released. But it's
already the case with libkwineffects too.
2023-10-25 12:46:12 +00:00
Laurent Montel
bc6116c5a7 There's no QVector anymore, QList is the QVector in Qt6 2023-10-19 13:43:53 +00:00
Vlad Zahorodnii
7d56aa3687 Merge wayland tests with other tests
This makes wayland tests organization consistent with other kwin tests.
2023-10-06 11:21:00 +00:00