From f6497f43b02e8b0351d0bbf0446c037161cda430 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Mon, 5 Jan 2026 01:17:30 -0700 Subject: [fix] issue where dragging doesn't work on native. --- rt/src/wl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'rt/src') diff --git a/rt/src/wl.c b/rt/src/wl.c index f528c22..8963e39 100644 --- a/rt/src/wl.c +++ b/rt/src/wl.c @@ -429,6 +429,9 @@ static void server_cursor_motion(struct wl_listener *listener, void *data) struct montis_server *server = wl_container_of(listener, server, cursor_motion); struct wlr_pointer_motion_event *event = data; + struct wlr_seat *seat = server->seat; + struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(seat); + uint32_t modifiers = keyboard ? wlr_keyboard_get_modifiers(keyboard) : 0; /* The cursor doesn't move unless we tell it to. The cursor automatically * handles constraining the motion to the output layout, as well as any * special configuration applied for the specific input device which @@ -437,6 +440,8 @@ static void server_cursor_motion(struct wl_listener *listener, void *data) wlr_cursor_move(server->cursor, &event->pointer->base, event->delta_x, event->delta_y); process_cursor_motion(server, event->time_msec); + plugin_call_update_state(server->plugin, plugin_handle_motion, event, + modifiers, 0, server->cursor->x, server->cursor->y); } static void server_cursor_motion_absolute(struct wl_listener *listener, @@ -460,7 +465,7 @@ static void server_cursor_motion_absolute(struct wl_listener *listener, event->y); process_cursor_motion(server, event->time_msec); plugin_call_update_state(server->plugin, plugin_handle_motion, event, - modifiers, server->cursor->x, server->cursor->y); + modifiers, 1, server->cursor->x, server->cursor->y); } static void server_cursor_button(struct wl_listener *listener, void *data) -- cgit