From: mental Date: Tue, 8 Jul 2008 03:01:39 +0000 (+0000) Subject: I'm an idiot who forgot that MOTION_HINT_MASK still needs MOTION_MASK X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=274f6d25a9facdc5bfbe8b4df42e6173e4328775;p=inkscape.git I'm an idiot who forgot that MOTION_HINT_MASK still needs MOTION_MASK --- diff --git a/src/arc-context.cpp b/src/arc-context.cpp index 0be96353e..322334dbd 100644 --- a/src/arc-context.cpp +++ b/src/arc-context.cpp @@ -270,7 +270,7 @@ static gint sp_arc_context_root_handler(SPEventContext *event_context, GdkEvent sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | - GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK, + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK, NULL, event->button.time); ret = TRUE; } diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp index 75441edb1..5d8d720b0 100644 --- a/src/box3d-context.cpp +++ b/src/box3d-context.cpp @@ -338,7 +338,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), ( GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | - GDK_POINTER_MOTION_HINT_MASK | + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK ), NULL, event->button.time); ret = TRUE; diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp index 32cb341ac..6f63aa3ce 100644 --- a/src/desktop-events.cpp +++ b/src/desktop-events.cpp @@ -226,7 +226,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_HINT_MASK ), + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK ), NULL, event->button.time); ret = TRUE; diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 5c77d4948..b780927d8 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -45,7 +45,7 @@ #include "display/inkscape-cairo.h" // GTK_CHECK_VERSION returns false on failure -#define HAS_GDK_EVENT_REQUEST_MOTIONS FALSE && GTK_CHECK_VERSION(2, 12, 0) +#define HAS_GDK_EVENT_REQUEST_MOTIONS GTK_CHECK_VERSION(2, 12, 0) // gtk_check_version returns non-NULL on failure static bool const HAS_BROKEN_MOTION_HINTS = @@ -539,9 +539,8 @@ sp_canvas_item_grab (SPCanvasItem *item, guint event_mask, GdkCursor *cursor, gu if (!(item->flags & SP_CANVAS_ITEM_VISIBLE)) return -1; - if (HAS_BROKEN_MOTION_HINTS && ( event_mask & GDK_POINTER_MOTION_HINT_MASK )) { + if (HAS_BROKEN_MOTION_HINTS) { event_mask &= ~GDK_POINTER_MOTION_HINT_MASK; - event_mask |= GDK_POINTER_MOTION_MASK; } /* fixme: Top hack (Lauris) */ @@ -1130,7 +1129,9 @@ sp_canvas_realize (GtkWidget *widget) GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | - ( HAS_BROKEN_MOTION_HINTS ? GDK_POINTER_MOTION_MASK : GDK_POINTER_MOTION_HINT_MASK ) | + GDK_POINTER_MOTION_MASK | + ( HAS_BROKEN_MOTION_HINTS ? + 0 : GDK_POINTER_MOTION_HINT_MASK ) | GDK_PROXIMITY_IN_MASK | GDK_PROXIMITY_OUT_MASK | GDK_KEY_PRESS_MASK | @@ -1238,7 +1239,7 @@ emit_event (SPCanvas *canvas, GdkEvent *event) mask = GDK_LEAVE_NOTIFY_MASK; break; case GDK_MOTION_NOTIFY: - mask = GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK; + mask = GDK_POINTER_MOTION_MASK; break; case GDK_BUTTON_PRESS: case GDK_2BUTTON_PRESS: diff --git a/src/dyna-draw-context.cpp b/src/dyna-draw-context.cpp index be5a4324c..77b632945 100644 --- a/src/dyna-draw-context.cpp +++ b/src/dyna-draw-context.cpp @@ -566,6 +566,7 @@ sp_dyna_draw_context_root_handler(SPEventContext *event_context, sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), ( GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK ), NULL, diff --git a/src/event-context.cpp b/src/event-context.cpp index 6a3071d43..7afe9070d 100644 --- a/src/event-context.cpp +++ b/src/event-context.cpp @@ -374,7 +374,7 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context, if (event_context->space_panning) { panning = 1; sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), - GDK_KEY_RELEASE_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_HINT_MASK, + GDK_KEY_RELEASE_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK, NULL, event->button.time-1); ret = TRUE; } @@ -385,7 +385,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_HINT_MASK, + GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK, NULL, event->button.time-1); } ret = TRUE; @@ -395,7 +395,7 @@ static gint sp_event_context_private_root_handler(SPEventContext *event_context, || event->button.state & GDK_CONTROL_MASK) { panning = 3; sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), - GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_HINT_MASK, + GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK, NULL, event->button.time); ret = TRUE; } else { diff --git a/src/knot.cpp b/src/knot.cpp index 7d220ef76..7e4a3dd25 100644 --- a/src/knot.cpp +++ b/src/knot.cpp @@ -31,6 +31,7 @@ #define KNOT_EVENT_MASK (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | \ + GDK_POINTER_MOTION_MASK | \ GDK_POINTER_MOTION_HINT_MASK | \ GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK) diff --git a/src/rect-context.cpp b/src/rect-context.cpp index 7759452e0..67a74ee11 100644 --- a/src/rect-context.cpp +++ b/src/rect-context.cpp @@ -312,6 +312,7 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), ( 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); diff --git a/src/select-context.cpp b/src/select-context.cpp index b4a069f72..010382376 100644 --- a/src/select-context.cpp +++ b/src/select-context.cpp @@ -341,7 +341,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_KEY_RELEASE_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | - GDK_POINTER_MOTION_HINT_MASK, + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK, NULL, event->button.time); sc->grabbed = SP_CANVAS_ITEM(desktop->drawing); @@ -448,7 +448,7 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) sc->grabbed = NULL; } sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), - GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK, + GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK, NULL, event->button.time); sc->grabbed = SP_CANVAS_ITEM(desktop->acetate); diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp index 02a75812f..3e431667f 100644 --- a/src/spiral-context.cpp +++ b/src/spiral-context.cpp @@ -272,6 +272,7 @@ sp_spiral_context_root_handler(SPEventContext *event_context, GdkEvent *event) sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), ( 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); diff --git a/src/star-context.cpp b/src/star-context.cpp index 4a13a98ed..2d4d7b415 100644 --- a/src/star-context.cpp +++ b/src/star-context.cpp @@ -287,7 +287,9 @@ static gint sp_star_context_root_handler(SPEventContext *event_context, GdkEvent sp_canvas_item_grab(SP_CANVAS_ITEM(desktop->acetate), GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | - GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK, + GDK_POINTER_MOTION_MASK | + GDK_POINTER_MOTION_HINT_MASK | + GDK_BUTTON_PRESS_MASK, NULL, event->button.time); ret = TRUE; } diff --git a/src/text-context.cpp b/src/text-context.cpp index d0fb06760..ed0709aec 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -615,8 +615,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons tc->p0 = desktop->w2d(button_pt); 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_HINT_MASK, + GDK_KEY_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK, NULL, event->button.time); tc->grabbed = SP_CANVAS_ITEM(desktop->acetate); tc->creating = 1;