diff options
-rw-r--r-- | sway/input/cursor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c index 9d14c585..e41acd8b 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c | |||
@@ -619,16 +619,16 @@ static void handle_tool_proximity(struct wl_listener *listener, void *data) { | |||
619 | 619 | ||
620 | static void handle_tool_button(struct wl_listener *listener, void *data) { | 620 | static void handle_tool_button(struct wl_listener *listener, void *data) { |
621 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_button); | 621 | struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_button); |
622 | struct sway_seat *seat = cursor->seat; | ||
622 | seat_idle_notify_activity(cursor->seat, IDLE_SOURCE_TABLET_TOOL); | 623 | seat_idle_notify_activity(cursor->seat, IDLE_SOURCE_TABLET_TOOL); |
624 | |||
623 | struct wlr_event_tablet_tool_button *event = data; | 625 | struct wlr_event_tablet_tool_button *event = data; |
624 | struct sway_tablet_tool *sway_tool = event->tool->data; | 626 | struct sway_tablet_tool *sway_tool = event->tool->data; |
625 | struct wlr_tablet_v2_tablet *tablet_v2 = sway_tool->tablet->tablet_v2; | ||
626 | struct sway_seat *seat = cursor->seat; | ||
627 | |||
628 | if (!sway_tool) { | 627 | if (!sway_tool) { |
629 | sway_log(SWAY_DEBUG, "tool button before proximity"); | 628 | sway_log(SWAY_DEBUG, "tool button before proximity"); |
630 | return; | 629 | return; |
631 | } | 630 | } |
631 | struct wlr_tablet_v2_tablet *tablet_v2 = sway_tool->tablet->tablet_v2; | ||
632 | 632 | ||
633 | double sx, sy; | 633 | double sx, sy; |
634 | struct wlr_surface *surface = NULL; | 634 | struct wlr_surface *surface = NULL; |