From a6235dd0ae24eff3d072a3baf9448fced32338aa Mon Sep 17 00:00:00 2001 From: buliabyak Date: Sun, 21 May 2006 17:32:32 +0000 Subject: [PATCH] eliminate GDK_POINTER_MOTION_HINT_MASK that broke dragging with tablet pen with newer gtk versions --- src/desktop-events.cpp | 5 ++--- src/event-context.cpp | 4 ++-- src/knot.cpp | 2 +- src/rect-context.cpp | 1 - src/select-context.cpp | 2 +- src/text-context.cpp | 2 +- src/widgets/ruler.cpp | 10 ++-------- 7 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp index bab39d332..a2dc1a492 100644 --- a/src/desktop-events.cpp +++ b/src/desktop-events.cpp @@ -85,7 +85,7 @@ static gint sp_dt_ruler_event(GtkWidget *widget, GdkEvent *event, SPDesktopWidge guide = sp_guideline_new(desktop->guides, guide_pos_dt, !horiz); sp_guideline_set_color(SP_GUIDELINE(guide), desktop->namedview->guidehicolor); gdk_pointer_grab(widget->window, FALSE, - (GdkEventMask)(GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK), + (GdkEventMask)(GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK ), NULL, NULL, event->button.time); } @@ -170,8 +170,7 @@ gint sp_dt_guide_event(SPCanvasItem *item, GdkEvent *event, gpointer data) sp_canvas_item_grab(item, ( GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | - GDK_POINTER_MOTION_MASK | - GDK_POINTER_MOTION_HINT_MASK ), + GDK_POINTER_MOTION_MASK ), NULL, event->button.time); ret = TRUE; diff --git a/src/event-context.cpp b/src/event-context.cpp index d91a064ba..273251d59 100644 --- a/src/event-context.cpp +++ b/src/event-context.cpp @@ -369,7 +369,7 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context, } else { panning = 2; sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), - GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK, + GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK, NULL, event->button.time-1); } ret = TRUE; @@ -381,7 +381,7 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context, event->button.y); panning = 3; sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), - GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK, + GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK, NULL, event->button.time); ret = TRUE; } else { diff --git a/src/knot.cpp b/src/knot.cpp index 3ec2799bd..a8d694779 100644 --- a/src/knot.cpp +++ b/src/knot.cpp @@ -31,7 +31,7 @@ #define KNOT_EVENT_MASK (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | \ - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | \ + GDK_POINTER_MOTION_MASK | \ GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK) static bool nograb = false; diff --git a/src/rect-context.cpp b/src/rect-context.cpp index a7a16fcad..96a3d4cf8 100644 --- a/src/rect-context.cpp +++ b/src/rect-context.cpp @@ -305,7 +305,6 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent ( GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | - GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK ), NULL, event->button.time); ret = TRUE; diff --git a/src/select-context.cpp b/src/select-context.cpp index 32eee593d..0f57f5e8e 100644 --- a/src/select-context.cpp +++ b/src/select-context.cpp @@ -327,7 +327,7 @@ sp_select_context_item_handler(SPEventContext *event_context, SPItem *item, GdkE sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->drawing), GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK, + GDK_POINTER_MOTION_MASK, NULL, event->button.time); sc->grabbed = SP_CANVAS_ITEM(desktop->drawing); diff --git a/src/text-context.cpp b/src/text-context.cpp index d5eaf6228..641d8bce2 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -610,7 +610,7 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event) Inkscape::Rubberband::get()->start(desktop, tc->p0); sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK, + GDK_POINTER_MOTION_MASK, NULL, event->button.time); tc->grabbed = SP_CANVAS_ITEM(desktop->acetate); tc->creating = 1; diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp index bd3ec28eb..5eb752377 100644 --- a/src/widgets/ruler.cpp +++ b/src/widgets/ruler.cpp @@ -104,10 +104,7 @@ sp_hruler_motion_notify (GtkWidget *widget, ruler = GTK_RULER (widget); - if (event->is_hint) - gdk_window_get_pointer (widget->window, &x, NULL, NULL); - else - x = (int)event->x; + x = (int)event->x; ruler->position = ruler->lower + ((ruler->upper - ruler->lower) * x) / widget->allocation.width; @@ -408,10 +405,7 @@ sp_vruler_motion_notify (GtkWidget *widget, ruler = GTK_RULER (widget); - if (event->is_hint) - gdk_window_get_pointer (widget->window, NULL, &y, NULL); - else - y = (int)event->y; + y = (int)event->y; ruler->position = ruler->lower + ((ruler->upper - ruler->lower) * y) / widget->allocation.height; -- 2.30.2