From 17d6f9eb93490bfb119da88e3cebb5eacce14bc9 Mon Sep 17 00:00:00 2001 From: auroux Date: Tue, 18 Mar 2008 02:46:43 +0000 Subject: [PATCH] Bugfix for X.org 7.3 / linuxwacom 0.7.9 issues. --- src/xo-callbacks.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/xo-callbacks.c b/src/xo-callbacks.c index 5e3a3cd..39204f0 100644 --- a/src/xo-callbacks.c +++ b/src/xo-callbacks.c @@ -2348,9 +2348,16 @@ on_canvas_button_press_event (GtkWidget *widget, gdk_device_get_state(event->device, event->window, event->axes, NULL); fix_xinput_coords((GdkEvent *)event); } + if (!finite(event->x) || !finite(event->y)) return FALSE; // Xorg 7.3 bug if (ui.cur_item_type == ITEM_TEXT && !is_event_within_textview(event)) end_text(); + if (ui.cur_item_type == ITEM_STROKE && ui.is_corestroke && !is_core && + ui.cur_path.num_points == 1) { + // Xorg 7.3+ sent core event before XInput event: fix initial point + ui.is_corestroke = FALSE; + get_pointer_coords((GdkEvent *)event, ui.cur_path.coords); + } if (ui.cur_item_type != ITEM_NONE) return FALSE; // we're already doing something ui.is_corestroke = is_core; @@ -2523,6 +2530,8 @@ on_canvas_motion_notify_event (GtkWidget *widget, if (!ui.use_xinput && !is_core) return FALSE; if (ui.use_xinput && is_core && !ui.is_corestroke) return FALSE; if (!is_core) fix_xinput_coords((GdkEvent *)event); + if (!finite(event->x) || !finite(event->y)) return FALSE; // Xorg 7.3 bug + if (!is_core) ui.is_corestroke = FALSE; looks_wrong = !(event->state & (1<<(7+ui.which_mouse_button))); -- 2.39.2