wlroots-hyprland/types
Manuel Stoeckl edb30a6828 Implement serial validation for selection requests
This change tracks, for each wlr_seat_client, the most recent serial
numbers which were sent to the client. When the client makes a
selection request, wlroots now verifies that the serial number
associated with the selection request was actually provided to that
specific client. This ensures that the client that was most
recently interacted with always has priority for its copy selection
requests, and that no other clients can incorrectly use a larger serial
value and "steal" the role of having the copy selection.

Also, the code used to determine when a given selection is superseded
by a newer request uses < instead of <= to allow clients to make
multiple selection requests with the same serial number and have the
last one hold.

To limit memory use, a ring buffer is used to store runs of sequential
serial numbers, and all serial numbers earlier than the start of the
ring buffer are assumed to be valid. Faking very old serials is
unlikely to be disruptive.

Assuming all clients are correctly written, the only additional
constraint which this patch should impose is that serial numbers
are now bound to seats: clients may not receive a serial number
from an input event on one seat and then use that to request
copy-selection on another seat.
2019-06-30 15:01:05 -04:00
..
data_device Implement serial validation for selection requests 2019-06-30 15:01:05 -04:00
seat Implement serial validation for selection requests 2019-06-30 15:01:05 -04:00
tablet_v2 send proximity_out in proximity in for tablet_v2 2019-03-31 20:16:03 +03:00
xdg_shell wlr_xdg_toplevel: store pending fullscreen output 2019-03-27 10:04:10 +02:00
xdg_shell_v6 wlr_xdg_toplevel_v6: store pending fullscreen output 2019-03-27 10:04:10 +02:00
meson.build Remove orbital screenshooter and gamma-control 2019-06-02 09:30:47 -04:00
wlr_box.c Standardize the wlr_box input paramaters 2018-12-21 13:56:10 -05:00
wlr_buffer.c buffer: add wlr_buffer_get_dmabuf 2019-06-07 09:06:11 -04:00
wlr_compositor.c Merge pull request #1116 from emersion/surface-role 2018-07-11 15:27:42 -07:00
wlr_cursor.c Implement the pointer-gestures-unstable-v1 protocol 2019-01-28 22:06:36 +01:00
wlr_data_control_v1.c Implement serial validation for selection requests 2019-06-30 15:01:05 -04:00
wlr_export_dmabuf_v1.c output: introduce wlr_output_lock_attach_render 2019-06-07 09:06:11 -04:00
wlr_foreign_toplevel_management_v1.c foreign-toplevel: support fullscreen state and request 2019-04-29 00:00:53 +03:00
wlr_fullscreen_shell_v1.c fullscreen-shell-v1: initial protocol implementation 2019-01-06 12:12:06 +01:00
wlr_gamma_control_v1.c gamma-control-v1: add missing destroy handler 2018-09-29 14:30:41 +02:00
wlr_gtk_primary_selection.c Implement serial validation for selection requests 2019-06-30 15:01:05 -04:00
wlr_idle.c idle: enable the compositors to add custom idle timeouts (#1655) 2019-04-17 08:48:43 +03:00
wlr_idle_inhibit_v1.c Init the new destroy signals added by #1200 2018-08-27 18:21:36 +02:00
wlr_input_device.c s/lid_switch/switch_device 2019-03-19 22:45:58 -04:00
wlr_input_inhibitor.c Init the new destroy signals added by #1200 2018-08-27 18:21:36 +02:00
wlr_input_method_v2.c input-method-v2: initialize destroy signal 2018-10-28 12:23:47 +01:00
wlr_keyboard.c Use a set to track pointer button state. 2019-06-16 00:59:53 +03:00
wlr_layer_shell_v1.c layer-shell: add _v1 suffix 2018-09-14 19:32:33 +02:00
wlr_linux_dmabuf_v1.c render: switch wlr_renderer to wlr_drm_format_set 2019-04-01 19:18:04 +03:00
wlr_list.c Revert "ELF Visibility" 2018-02-19 18:01:27 -05:00
wlr_matrix.c Fix typos in comments and strings 2018-05-03 21:59:43 +01:00
wlr_output.c output: remove wlr_output_impl.transform 2019-06-16 10:51:49 -04:00
wlr_output_damage.c output-damage: set needs swap only when we have new damage 2019-06-27 21:49:19 +03:00
wlr_output_layout.c output: remove lx, ly 2019-04-13 08:31:30 -06:00
wlr_output_management_v1.c output: remove lx, ly 2019-04-13 08:31:30 -06:00
wlr_pointer.c Implement the pointer-gestures-unstable-v1 protocol 2019-01-28 22:06:36 +01:00
wlr_pointer_constraints_v1.c pointer-constraints: use proper wayland-scanner functions 2018-09-27 10:53:11 +02:00
wlr_pointer_gestures_v1.c Implement the pointer-gestures-unstable-v1 protocol 2019-01-28 22:06:36 +01:00
wlr_presentation_time.c output: add presentation refresh prediction 2018-10-04 22:00:24 +02:00
wlr_primary_selection.c Implement serial validation for selection requests 2019-06-30 15:01:05 -04:00
wlr_primary_selection_v1.c Implement serial validation for selection requests 2019-06-30 15:01:05 -04:00
wlr_region.c compositor: redesign how resources are managed 2018-04-26 17:51:06 +01:00
wlr_relative_pointer_v1.c relative-pointer-v1: time is in usec, not msec 2019-01-30 21:25:42 +01:00
wlr_screencopy_v1.c output: introduce wlr_output_lock_attach_render 2019-06-07 09:06:11 -04:00
wlr_server_decoration.c Init the new destroy signals added by #1200 2018-08-27 18:21:36 +02:00
wlr_surface.c subsurface: add map/unmap events 2019-02-17 12:01:15 +01:00
wlr_switch.c s/lid_switch/switch_device 2019-03-19 22:45:58 -04:00
wlr_tablet_pad.c Use wlr_list for paths, and improve inert resource handling 2018-07-14 09:43:17 +02:00
wlr_tablet_tool.c rename wlr_tablet_tool to wlr_tablet 2018-07-14 09:49:58 +02:00
wlr_text_input_v3.c text-input-v3: remove newline in log message 2018-11-26 12:15:34 +01:00
wlr_touch.c Revert "ELF Visibility" 2018-02-19 18:01:27 -05:00
wlr_virtual_keyboard_v1.c virtual_keyboard: Require keymap before accepting keycodes 2019-06-24 17:16:37 +03:00
wlr_xcursor_manager.c Redesign wlr_texture 2018-03-24 23:48:32 -04:00
wlr_xdg_decoration_v1.c Fix a crash on zxdg_decoration_manager_v1 destroy 2018-10-01 14:45:17 +02:00
wlr_xdg_output_v1.c xdg-output: schedule a wl_output.done event on update 2019-04-27 10:02:21 -06:00