aboutsummaryrefslogtreecommitdiff
path: root/sway/input
diff options
context:
space:
mode:
authorJason Nader <jason.nader@protonmail.com>2020-03-15 17:35:29 +0900
committerDrew DeVault <sir@cmpwn.com>2020-03-15 14:30:32 +0100
commit3ed780c78360dceeae28d6fed5989e23271d83b8 (patch)
treecd1ef2ce31f195de838b38d910c1996105edf710 /sway/input
parent8b21bc6a7905e3386ad62e7b7a3f0936ecbca167 (diff)
downloadsway-3ed780c78360dceeae28d6fed5989e23271d83b8.tar.xz
sway/input/cursor.c: move NULL check to where it should be
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/cursor.c6
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) {
static void handle_tool_button(struct wl_listener *listener, void *data) {
struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_button);
+ struct sway_seat *seat = cursor->seat;
seat_idle_notify_activity(cursor->seat, IDLE_SOURCE_TABLET_TOOL);
+
struct wlr_event_tablet_tool_button *event = data;
struct sway_tablet_tool *sway_tool = event->tool->data;
- struct wlr_tablet_v2_tablet *tablet_v2 = sway_tool->tablet->tablet_v2;
- struct sway_seat *seat = cursor->seat;
-
if (!sway_tool) {
sway_log(SWAY_DEBUG, "tool button before proximity");
return;
}
+ struct wlr_tablet_v2_tablet *tablet_v2 = sway_tool->tablet->tablet_v2;
double sx, sy;
struct wlr_surface *surface = NULL;