wlroots/types
Daniel Hill 47f8cefad8 output/cursor: deferred cursor move
This feature is meant to be used with VRR / Adaptive Sync.
Currently cursor move drives the display at the poll rate of the mouse.
This adds a deferred delay for a variety situations:
To save power on battery
To maintain smooth video playback (i.e. render video 30fps at 60 or 120fps)
To maintain smooth gaming experience (i.e. only enforce redraw at VRR minimum Hz)

I've tried to make it as unopinionated as possible, while also reducing
complexity for downstream developers.

The design should be backwards compatible, as long as
wlr_set_cursor_max_latency() is never called wlr_cursor_move() should act as
normal

I considered using wl_signals, but I'm not familiar with the interface, and it
felt somewhat overkill.

There's a reference implementation in branch deferred-cursor-move:
github:YellowOnion/sway
2024-04-24 22:00:13 +12:00
..
buffer buffer: convert to try_from 2023-10-19 18:19:27 +02:00
data_device treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
output output/cursor: deferred cursor move 2024-04-24 22:00:13 +12:00
scene wlr_scene: Update outputs if subpixel status changes 2023-11-15 18:42:12 -05:00
seat Drop wl_client and user data assertions in bind handlers 2023-10-10 20:10:00 +03:00
tablet_v2 Drop wl_client and user data assertions in bind handlers 2023-10-10 20:10:00 +03:00
xdg_shell xdg-shell: add wlr_xdg_{toplevel,popup}_try_from_wlr_surface() 2023-11-13 10:31:00 +01:00
meson.build security-context-v1: new protocol implementation 2023-10-10 10:34:01 +02:00
wlr_compositor.c compositor: add wlr_surface.unmap_commit 2023-10-26 14:57:10 +00:00
wlr_content_type_v1.c content-type-v1: add version param to wlr_content_type_manager_v1_create() 2022-11-15 16:43:04 +01:00
wlr_cursor.c output/cursor: deferred cursor move 2024-04-24 22:00:13 +12:00
wlr_cursor_shape_v1.c cursor-shape-v1: handle inert tablet tool client 2024-03-04 13:09:14 -05:00
wlr_damage_ring.c Use struct initializers instead of memset() 2023-07-07 17:31:11 +02:00
wlr_data_control_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_drm.c drm: convert to try_from 2023-10-19 18:19:38 +02:00
wlr_drm_lease_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_export_dmabuf_v1.c output_event_commit: Remove committed and buffer 2023-10-06 10:06:01 +00:00
wlr_foreign_toplevel_management_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_fractional_scale_v1.c wp-fractional-scale-v1: new protocol implementation 2023-02-08 16:31:39 +01:00
wlr_fullscreen_shell_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_gamma_control_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_idle_inhibit_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_idle_notify_v1.c idle-notify-v1: new protocol implementation 2022-10-14 13:36:15 +00:00
wlr_input_device.c Use struct initializers instead of memset() 2023-07-07 17:31:11 +02:00
wlr_input_inhibitor.c Drop wl_client and user data assertions in bind handlers 2023-10-10 20:10:00 +03:00
wlr_input_method_v2.c input-method-v2: validate commit serial 2023-12-18 10:22:00 -05:00
wlr_keyboard.c Use struct initializers instead of memset() 2023-07-07 17:31:11 +02:00
wlr_keyboard_group.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_keyboard_shortcuts_inhibit_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_layer_shell_v1.c layer-shell: forbid set_size with values ≥INT32_MAX 2024-01-24 09:27:34 -05:00
wlr_linux_dmabuf_v1.c linux-dmabuf-v1: skip import check on split render/display SoCs 2023-11-20 19:54:16 +01:00
wlr_matrix.c matrix: remove wlr_matrix_projection() 2022-06-08 19:27:36 +00:00
wlr_output_layer.c output-layer: add feedback event 2023-02-20 18:38:57 +01:00
wlr_output_layout.c output-layout: fix missing global for outputs with a custom mode 2023-12-21 13:07:55 -05:00
wlr_output_management_v1.c wlr-output-management: Send custom modes to clients 2023-11-06 17:46:55 +00:00
wlr_output_power_management_v1.c output_event_commit: Remove committed and buffer 2023-10-06 10:06:01 +00:00
wlr_pointer.c Use struct initializers instead of memset() 2023-07-07 17:31:11 +02:00
wlr_pointer_constraints_v1.c pointer-constraints: handle inert pointer resources correctly 2024-02-06 21:01:37 -05:00
wlr_pointer_gestures_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_presentation_time.c backend: drop wlr_backend_get_presentation_clock() 2023-10-30 18:39:39 +01:00
wlr_primary_selection.c Use struct initializers instead of memset() 2023-07-07 17:31:11 +02:00
wlr_primary_selection_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_region.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_relative_pointer_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_screencopy_v1.c screencopy: Use box size instead for shm copy 2023-11-20 11:33:11 -05:00
wlr_security_context_v1.c security-context-v1: add commit event 2023-10-10 10:34:01 +02:00
wlr_server_decoration.c Drop wl_client and user data assertions in bind handlers 2023-10-10 20:10:00 +03:00
wlr_session_lock_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_shm.c shm: add create() function without a wlr_renderer 2022-11-25 15:16:42 +00:00
wlr_single_pixel_buffer_v1.c single-pixel-buffer-v1: new protocol implementation 2022-08-03 10:35:23 +00:00
wlr_subcompositor.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_switch.c Use struct initializers instead of memset() 2023-07-07 17:31:11 +02:00
wlr_tablet_pad.c Use struct initializers instead of memset() 2023-07-07 17:31:11 +02:00
wlr_tablet_tool.c Use struct initializers instead of memset() 2023-07-07 17:31:11 +02:00
wlr_tearing_control_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_text_input_v3.c Drop wl_client and user data assertions in bind handlers 2023-10-10 20:10:00 +03:00
wlr_touch.c Use struct initializers instead of memset() 2023-07-07 17:31:11 +02:00
wlr_viewporter.c viewporter: fix src buffer bounds check 2023-11-28 12:28:08 -05:00
wlr_virtual_keyboard_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_virtual_pointer_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_xcursor_manager.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_xdg_activation_v1.c util/token: rename TOKEN_STRLEN to TOKEN_SIZE 2023-10-26 16:30:12 +00:00
wlr_xdg_decoration_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_xdg_foreign_registry.c Use wl_signal_emit_mutable 2022-08-18 07:16:16 -04:00
wlr_xdg_foreign_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_xdg_foreign_v2.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00
wlr_xdg_output_v1.c treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical 2023-10-03 01:51:07 -04:00