From: auroux Date: Mon, 30 Nov 2009 03:06:23 +0000 (+0000) Subject: fix: don't lose tracking of pointer events when exiting canvas X-Git-Url: https://git.donarmstrong.com/?p=xournal.git;a=commitdiff_plain;h=7c3977e2b071d90aaff1f077512e6794373c4e6b fix: don't lose tracking of pointer events when exiting canvas --- diff --git a/ChangeLog b/ChangeLog index fcc818e..b6dfa1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ This version: - win32 portability code (contributed by Dirk Gerrits) - - fix a bug in PDF export code on 64-bit systems (patch by Robert Buchholz) + - fix bug in PDF export code on 64-bit systems (patch by Robert Buchholz) + - fix hand tool bug when exiting canvas (#2905711) Version 0.4.5 (Oct 2, 2009): - bugfixes for GTK+ 2.16/2.17 issues with xinput events diff --git a/src/TODO b/src/TODO index 64679ce..cf116c0 100644 --- a/src/TODO +++ b/src/TODO @@ -54,6 +54,11 @@ PATCHES TO INCORPORATE: ** insert images patch (Victor Saase) #2890925 +- customize paper ruling (Gautam Iyer e-mail Nov 28 2009, will update with + glade dialog box) + + + - PDF bg memory usage throttling / delete oldest pdf backgrounds - replace ttsubset by something more modern? (eg. from cairo ?) - auto-hide patch from ~/prog/src/xournal-autohide/ ? diff --git a/src/xo-callbacks.c b/src/xo-callbacks.c index cf887c7..0e8e02b 100644 --- a/src/xo-callbacks.c +++ b/src/xo-callbacks.c @@ -2562,6 +2562,7 @@ on_canvas_enter_notify_event (GtkWidget *widget, dev = GDK_DEVICE(dev_list->data); gdk_device_set_mode(dev, GDK_MODE_SCREEN); } + ui.is_corestroke = ui.saved_is_corestroke; } return FALSE; } @@ -2584,6 +2585,8 @@ on_canvas_leave_notify_event (GtkWidget *widget, dev = GDK_DEVICE(dev_list->data); gdk_device_set_mode(dev, GDK_MODE_DISABLED); } + ui.saved_is_corestroke = ui.is_corestroke; + ui.is_corestroke = TRUE; } return FALSE; } @@ -2714,6 +2717,9 @@ on_canvas_motion_notify_event (GtkWidget *widget, else if (ui.cur_item_type == ITEM_RESIZESEL) { finalize_resizesel(); } + else if (ui.cur_item_type == ITEM_HAND) { + ui.cur_item_type = ITEM_NONE; + } switch_mapping(0); return FALSE; } diff --git a/src/xournal.h b/src/xournal.h index 15906cd..7c7d4c3 100644 --- a/src/xournal.h +++ b/src/xournal.h @@ -252,6 +252,7 @@ typedef struct UIData { gboolean pressure_sensitivity; // use pen pressure to control stroke width? double width_minimum_multiplier, width_maximum_multiplier; // calibration for pressure sensitivity gboolean is_corestroke; // this stroke is painted with core pointer + gboolean saved_is_corestroke; GdkDevice *stroke_device; // who's painting this stroke int screen_width, screen_height; // initial screen size, for XInput events double hand_refpt[2];