+#ifdef INPUT_DEBUG
+ printf("DEBUG: ButtonDown (%s) (x,y)=(%.2f,%.2f)\n",
+ is_core?"core":"xinput", event->x, event->y);
+#endif
+ if (!finite(event->x) || !finite(event->y)) return FALSE; // Xorg 7.3 bug
+
+ if (ui.cur_item_type == ITEM_TEXT) {
+ if (!is_event_within_textview(event)) end_text();
+/* // bugfix for GTK+ 2.17, no longer needed as XInput is disabled during text edition
+ else fix_extended_events(ui.cur_item->widget, (GdkEvent *)event,
+ gtk_text_view_get_window(GTK_TEXT_VIEW(ui.cur_item->widget), GTK_TEXT_WINDOW_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);
+ }