aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 1827c744..b38b62c8 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -541,25 +541,17 @@ static void handle_tablet_tool_position(struct sway_cursor *cursor,
541 double sx, sy; 541 double sx, sy;
542 struct wlr_surface *surface = NULL; 542 struct wlr_surface *surface = NULL;
543 struct sway_seat *seat = cursor->seat; 543 struct sway_seat *seat = cursor->seat;
544 struct sway_node *focused_node = node_at_coords(seat, cursor->cursor->x, 544 node_at_coords(seat, cursor->cursor->x, cursor->cursor->y, &surface, &sx, &sy);
545 cursor->cursor->y, &surface, &sx, &sy);
546 struct sway_tablet_tool *sway_tool = tool->data; 545 struct sway_tablet_tool *sway_tool = tool->data;
547 546
548 if (!surface || !wlr_surface_accepts_tablet_v2(tablet->tablet_v2, surface)) { 547 if (surface && wlr_surface_accepts_tablet_v2(tablet->tablet_v2, surface)) {
548 seatop_tablet_tool_motion(seat, tablet, sway_tool, time_msec, dx, dy);
549 } else {
549 wlr_tablet_v2_tablet_tool_notify_proximity_out(sway_tool->tablet_v2_tool); 550 wlr_tablet_v2_tablet_tool_notify_proximity_out(sway_tool->tablet_v2_tool);
550 pointer_motion(cursor, time_msec, input_device->wlr_device, dx, dy, dx, dy); 551 pointer_motion(cursor, time_msec, input_device->wlr_device, dx, dy, dx, dy);
551 transaction_commit_dirty();
552 return;
553 }
554
555 wlr_tablet_v2_tablet_tool_notify_proximity_in(sway_tool->tablet_v2_tool,
556 tablet->tablet_v2, surface);
557
558 if (focused_node && config->focus_follows_mouse != FOLLOWS_NO) {
559 seat_set_focus(seat, focused_node);
560 } 552 }
561 553
562 wlr_tablet_v2_tablet_tool_notify_motion(sway_tool->tablet_v2_tool, sx, sy); 554 transaction_commit_dirty();
563} 555}
564 556
565static void handle_tool_axis(struct wl_listener *listener, void *data) { 557static void handle_tool_axis(struct wl_listener *listener, void *data) {