aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Tudor Brindus <me@tbrindus.ca>2020-05-02 19:09:58 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2020-05-13 08:58:23 +0200
commit2262ae60f4c405b881ca342a96f90865adc60ad0 (patch)
tree6778e0b475f39d9c19fa317495d4f688b27d06af
parentSimplify repaint scheduling documentation (diff)
downloadsway-2262ae60f4c405b881ca342a96f90865adc60ad0.tar.gz
sway-2262ae60f4c405b881ca342a96f90865adc60ad0.tar.zst
sway-2262ae60f4c405b881ca342a96f90865adc60ad0.zip
input/cursor: don't apply pointer constraint to emulated tablet input
Closes #5268.
-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