mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
data-device, primary-selection: add request_set_selection
This makes compositors able to block and/or customize set_selection requests coming from clients. For instance, it's possible for a compositor to disable rich selection content (by removing all MIME types except text/plain). This commit implements the design proposed in [1]. Two new events are added to wlr_seat: request_set_selection and request_set_primary_selection. Compositors need to listen to these events and either destroy the source or effectively set the selection. Fixes https://github.com/swaywm/wlroots/issues/1138 [1]: https://github.com/swaywm/wlroots/issues/1367#issuecomment-442403454
This commit is contained in:
parent
c41d01306d
commit
4cb0697e57
15 changed files with 142 additions and 63 deletions
|
|
@ -274,8 +274,10 @@ struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name) {
|
|||
|
||||
wl_signal_init(&seat->events.request_set_cursor);
|
||||
|
||||
wl_signal_init(&seat->events.selection);
|
||||
wl_signal_init(&seat->events.primary_selection);
|
||||
wl_signal_init(&seat->events.request_set_selection);
|
||||
wl_signal_init(&seat->events.set_selection);
|
||||
wl_signal_init(&seat->events.request_set_primary_selection);
|
||||
wl_signal_init(&seat->events.set_primary_selection);
|
||||
|
||||
wl_signal_init(&seat->events.pointer_grab_begin);
|
||||
wl_signal_init(&seat->events.pointer_grab_end);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue