diff options
-rw-r--r-- | sway/input/cursor.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 3a4a69b6..5dc7290d 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -368,6 +368,12 @@ static void handle_touch_down(struct wl_listener *listener, void *data) { | |||
368 | event->touch_id, sx, sy); | 368 | event->touch_id, sx, sy); |
369 | cursor_hide(cursor); | 369 | cursor_hide(cursor); |
370 | } | 370 | } |
371 | |||
372 | //move cursor so focus follows touch | ||
373 | float delta_x = lx - cursor->cursor->x; | ||
374 | float delta_y = ly - cursor->cursor->y; | ||
375 | cursor_motion(cursor, 0, event->device, delta_x, | ||
376 | delta_y, delta_x, delta_y); | ||
371 | } | 377 | } |
372 | 378 | ||
373 | static void handle_touch_up(struct wl_listener *listener, void *data) { | 379 | static void handle_touch_up(struct wl_listener *listener, void *data) { |