cursor: generalize seat->pressed

This commit moduralize seat_{set,reset}_pressed() into
cursor_context_save() so that we can also have seat->hovered later.
This commit is contained in:
tokyo4j 2025-11-21 01:25:19 +09:00 committed by Hiroaki Yamamoto
parent 4fcb873f6f
commit acb3da7903
8 changed files with 97 additions and 68 deletions

View file

@ -34,7 +34,7 @@ handle_drag_start(struct wl_listener *listener, void *data)
struct wlr_drag *drag = data;
seat->drag.active = true;
seat_reset_pressed(seat);
cursor_context_save(&seat->pressed, NULL);
if (drag->icon) {
/* Cleans up automatically on drag->icon->events.destroy */
wlr_scene_drag_icon_create(seat->drag.icons, drag->icon);