From 3ad7b146eb8981d5ff322c0bae0ec4ed94e04268 Mon Sep 17 00:00:00 2001 From: Markus Ongyerth Date: Mon, 23 Jul 2018 10:10:00 +0200 Subject: Fix typos/order in tablet-v2 --- types/tablet_v2/wlr_tablet_v2_pad.c | 6 +++--- types/tablet_v2/wlr_tablet_v2_tool.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/tablet_v2/wlr_tablet_v2_pad.c b/types/tablet_v2/wlr_tablet_v2_pad.c index b5b52939..f66d2916 100644 --- a/types/tablet_v2/wlr_tablet_v2_pad.c +++ b/types/tablet_v2/wlr_tablet_v2_pad.c @@ -476,9 +476,9 @@ void wlr_send_tablet_v2_tablet_pad_button( void wlr_send_tablet_v2_tablet_pad_strip(struct wlr_tablet_v2_tablet_pad *pad, uint32_t strip, double position, bool finger, uint32_t time) { - if (!pad->current_client && - pad->current_client->strips && - pad->current_client->strips[strip]) { + if (!pad->current_client || + !pad->current_client->strips || + !pad->current_client->strips[strip]) { return; } struct wl_resource *resource = pad->current_client->strips[strip]; diff --git a/types/tablet_v2/wlr_tablet_v2_tool.c b/types/tablet_v2/wlr_tablet_v2_tool.c index 81c518ab..c6ae6576 100644 --- a/types/tablet_v2/wlr_tablet_v2_tool.c +++ b/types/tablet_v2/wlr_tablet_v2_tool.c @@ -389,11 +389,11 @@ void wlr_send_tablet_v2_tablet_tool_proximity_out( if (tool->is_down) { zwp_tablet_tool_v2_send_up(tool->current_client->resource); } - zwp_tablet_tool_v2_send_proximity_out(tool->current_client->resource); if (tool->current_client->frame_source) { wl_event_source_remove(tool->current_client->frame_source); send_tool_frame(tool->current_client); } + zwp_tablet_tool_v2_send_proximity_out(tool->current_client->resource); tool->current_client = NULL; tool->focused_surface = NULL; -- cgit v1.2.3