mirror of
https://github.com/swaywm/sway.git
synced 2025-01-23 17:26:41 +00:00
sway/input/cursor.c: move NULL check to where it should be
This commit is contained in:
parent
8b21bc6a79
commit
3ed780c783
|
@ -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) {
|
static void handle_tool_button(struct wl_listener *listener, void *data) {
|
||||||
struct sway_cursor *cursor = wl_container_of(listener, cursor, tool_button);
|
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);
|
seat_idle_notify_activity(cursor->seat, IDLE_SOURCE_TABLET_TOOL);
|
||||||
|
|
||||||
struct wlr_event_tablet_tool_button *event = data;
|
struct wlr_event_tablet_tool_button *event = data;
|
||||||
struct sway_tablet_tool *sway_tool = event->tool->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) {
|
if (!sway_tool) {
|
||||||
sway_log(SWAY_DEBUG, "tool button before proximity");
|
sway_log(SWAY_DEBUG, "tool button before proximity");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
struct wlr_tablet_v2_tablet *tablet_v2 = sway_tool->tablet->tablet_v2;
|
||||||
|
|
||||||
double sx, sy;
|
double sx, sy;
|
||||||
struct wlr_surface *surface = NULL;
|
struct wlr_surface *surface = NULL;
|
||||||
|
|
Loading…
Reference in a new issue