wlroots-hyprland/rootston
emersion f001f98cef
gtk-primary-selection: refactor everything, untie from seat
This commits completely refactors wlr_gtk_primary_selection. The goal is to
remove gtk-primary-selection state from the seat and better handle inert
resources where it makes sense.

wlr_seat_client.primary_selection_devices has been removed and replaced by
wlr_gtk_primary_selection_device. This allows us to make offers inert when the
current selection is replaced.

wlr_seat_set_primary_selection has been removed because it relied on wlr_seat
instead of wlr_gtk_primary_selection_device_manager. A new function,
wlr_gtk_primary_selection_device_manager_set_selection (candidate for the
longest function name in wlroots) has been added. It doesn't take a serial
anymore as serial checking only makes sense for set_selection requests coming
from Wayland clients (serial checking is now done in the Wayland interface
implementation).

Since wlr_gtk_primary_selection_device_manager is now required to set the
selection, a new function wlr_xwayland_set_gtk_primary_selection_device_manager
(candidate number two for longest function name) has been added.

Devices are now made inert when the seat goes away.

Future work includes removing the last primary selection bits from the seat,
mainly wlr_seat.primary_selection_source and wlr_seat.events.primary_selection,
replacing those with new fields in wlr_gtk_primary_selection_device. Or maybe
we could keep those in the seat and replace them with a re-usable interface
(for future zwp_primary_selection_v1 support). We need to think how we'll sync
these three protocols (GTK, X11 and wayland-protocols).

See https://github.com/swaywm/wlroots/issues/1388
2018-11-27 18:57:26 +01:00
..
config.c Update sizes for new EDID database. 2018-10-04 08:11:09 -07:00
cursor.c rootston: remove broken rotated pointer constraint handling 2018-09-27 10:42:35 +02:00
desktop.c gtk-primary-selection: refactor everything, untie from seat 2018-11-27 18:57:26 +01:00
ini.c Fix gcc string truncation warnings 2018-04-13 14:37:53 +09:00
input.c Use #if instead of #ifdef for wlroots config data 2018-11-12 10:12:46 +01:00
keyboard.c Merge pull request #1262 from nyorain/session_fix 2018-10-04 17:36:39 +02:00
layer_shell.c layer-shell: add _v1 suffix 2018-09-14 19:32:33 +02:00
main.c Use #if instead of #ifdef for wlroots config data 2018-11-12 10:12:46 +01:00
meson.build Use #if instead of #ifdef for wlroots config data 2018-11-12 10:12:46 +01:00
output.c output: add wlr_output_render_software_cursors 2018-11-13 16:55:33 +01:00
rootston.ini.example Implement pointer-constraints protocol in wlroots and rootston 2018-09-18 10:14:33 +02:00
seat.c Use #if instead of #ifdef for wlroots config data 2018-11-12 10:12:46 +01:00
text_input.c text-input: Accept disable requests 2018-10-13 20:46:53 +00:00
virtual_keyboard.c util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00
wl_shell.c util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00
xdg_shell.c Fix bugs listed by clang's static analyzer 2018-08-31 19:41:18 +02:00
xdg_shell_v6.c rootston: focus newly-created surfaces 2018-07-29 21:58:33 +03:00
xwayland.c util: add wlr_ prefix to log symbols 2018-07-09 22:49:54 +01:00