1 commit e7c03a6de0c76256810b6340e0a954e88c3448e9
2 Author: Reinhard Fössmeier <info@ais-sanmarino.org>
3 Date: Wed May 12 20:23:18 2010 +0200
5 fixed a problem in mouse event processing
7 Fixed a problem in mouse event processing that interfered with selecting
8 the scan rectangle in the preview window.
10 src/xsane-preview.c | 9 ++++-----
11 1 file changed, 4 insertions(+), 5 deletions(-)
13 diff --git a/src/xsane-preview.c b/src/xsane-preview.c
14 index f089dd1..264c775 100644
15 --- a/src/xsane-preview.c
16 +++ b/src/xsane-preview.c
18 #include "xsane-preview.h"
19 #include "xsane-preferences.h"
20 #include "xsane-gamma.h"
21 -#include <gdk/gdkkeysyms.h>
25 @@ -3023,9 +3022,9 @@ static gint preview_motion_event_handler(GtkWidget *window, GdkEvent *event, gpo
26 preview_display_color_components(p, event->motion.x, event->motion.y);
28 switch (((GdkEventMotion *)event)->state &
29 - GDK_Num_Lock & GDK_Caps_Lock & GDK_Shift_Lock & GDK_Scroll_Lock) /* mask all Locks */
30 + (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK | GDK_BUTTON3_MASK)) /* only check for mouse buttons */
32 - case 256: /* left button */
33 + case GDK_BUTTON1_MASK: /* left button */
35 DBG(DBG_info2, "left button\n");
37 @@ -3292,8 +3291,8 @@ static gint preview_motion_event_handler(GtkWidget *window, GdkEvent *event, gpo
41 - case 512: /* middle button */
42 - case 1024: /* right button */
43 + case GDK_BUTTON2_MASK: /* middle button */
44 + case GDK_BUTTON3_MASK: /* right button */
45 DBG(DBG_info2, "middle or right button\n");
47 if (p->selection_drag)