summaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index bb846e38..f3f056d1 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -292,16 +292,19 @@ void cursor_unhide(struct sway_cursor *cursor) {
292static void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec, 292static void pointer_motion(struct sway_cursor *cursor, uint32_t time_msec,
293 struct wlr_input_device *device, double dx, double dy, 293 struct wlr_input_device *device, double dx, double dy,
294 double dx_unaccel, double dy_unaccel) { 294 double dx_unaccel, double dy_unaccel) {
295 cursor_handle_activity(cursor, IDLE_SOURCE_POINTER); 295 if (device->type == WLR_INPUT_DEVICE_POINTER) {
296 cursor_handle_activity(cursor, IDLE_SOURCE_POINTER);
297 }
296 298
297 wlr_relative_pointer_manager_v1_send_relative_motion( 299 wlr_relative_pointer_manager_v1_send_relative_motion(
298 server.relative_pointer_manager, 300 server.relative_pointer_manager,
299 cursor->seat->wlr_seat, (uint64_t)time_msec * 1000, 301 cursor->seat->wlr_seat, (uint64_t)time_msec * 1000,
300 dx, dy, dx_unaccel, dy_unaccel); 302 dx, dy, dx_unaccel, dy_unaccel);
301 303
302 struct wlr_surface *surface = NULL; 304 // Only apply pointer constraints to real pointer input.
303 double sx, sy; 305 if (cursor->active_constraint && device->type == WLR_INPUT_DEVICE_POINTER) {
304 if (cursor->active_constraint) { 306 struct wlr_surface *surface = NULL;
307 double sx, sy;
305 node_at_coords(cursor->seat, 308 node_at_coords(cursor->seat,
306 cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy); 309 cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
307 310