1
0
Fork 0
Commit graph

4 commits

Author SHA1 Message Date
Jonas Ådahl
2731f0cda4 wayland: Setup and use ownership chains
As elsewhere, make sure objects that need to have a ownership up to the
context, and use this ownership chain to find relevant components, such
as the backend or the Wayland compositor object instance.

wayland/data-device: Hook up data devices to seats

They are tied to a seat - make that connection in struct fields too, so
that related objects can get to the context via it.

wayland: Don't get Wayland compositor via singleton getter

This means via the ownership chain or equivalent.

xwayland: Hook up manager to Wayland compositor

Same applies to the drag-n-drop struct.

xwayland: Make X11 event handling compositor instance aware

This avoids finding it via singletons in the callee.

xwayland: Don't get Wayland compositor from singleton

xwayland: Pass manager when handling dnd event

window/xwayland: Don't get Wayland compositor from singleton

xwayland/grab-keyboard: Don't get backend from singleton

xwayland: Don't get backend from singleton

wayland: Always get the backend from the context

This means traveling up the ownership chain or equivalent when
necessary.

wayland: Hook up data devices, offers and sources to the compositor

This allows tying them to a context without going through any
singletons.

wayland: Don't get display from singleton

xwayland: Don't get display from singleton

tablet: Don't get display from singleton

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2718>
2022-12-17 15:13:48 +01:00
Carlos Garnacho
2becb3dd29 wayland: Add support for wayland-protocols primary selection protocol
This protocol was added some time ago. Supporting it fell through the
cracks. Add new data device/source/offer implementations for it,
interoperation between primary selection protocols (and X11 primary
selection for that matter) comes for free.

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/943

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1255
2020-05-13 18:27:46 +02:00
Carlos Garnacho
037b68ab8e wayland: Rename gtk primary protocol files to "legacy"
We want to make room for the wayland-protocols primary selection
protocol. Rename our private protocol as "legacy".

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1255
2020-05-13 18:18:14 +02:00
Carlos Garnacho
4726f3d5d3 wayland: Move primary data offers to their own file
Following the MetaWaylandDataOffer split.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1193
2020-04-17 00:46:23 +02:00