Code

I'm an idiot who forgot that MOTION_HINT_MASK still needs MOTION_MASK
authormental <mental@users.sourceforge.net>
Tue, 8 Jul 2008 03:01:39 +0000 (03:01 +0000)
committermental <mental@users.sourceforge.net>
Tue, 8 Jul 2008 03:01:39 +0000 (03:01 +0000)
12 files changed:
src/arc-context.cpp
src/box3d-context.cpp
src/desktop-events.cpp
src/display/sp-canvas.cpp
src/dyna-draw-context.cpp
src/event-context.cpp
src/knot.cpp
src/rect-context.cpp
src/select-context.cpp
src/spiral-context.cpp
src/star-context.cpp
src/text-context.cpp

index 0be96353e80ca6d3beab5cf3873e5741b4513fb1..322334dbdd9e00dee1f4f0f0d61d650bb075409e 100644 (file)
@@ -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;
             }
index 75441edb1b99c99c38ea3f077dd0fb652f644fbf..5d8d720b020187c913d66e64888c801af23e775f 100644 (file)
@@ -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;
index 32cb341acd00b7674625030201e4ba84993b1e99..6f63aa3ce54250c7ad1eef5cb23a78d7690711e4 100644 (file)
@@ -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;
index 5c77d4948bae0fee964b92a02ff46391487c13d5..b780927d8c472144380329e182a5cf2e1cddb694 100644 (file)
@@ -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:
index be5a4324c46c7dc3badac29e8bab8d136e0f9d61..77b63294554f628bacdfad3f2e892be304b9353b 100644 (file)
@@ -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,
index 6a3071d430012fb838ec11885a826aee137f1c90..7afe9070dd670bc5aa569b7b1620d49f7b2d3b80 100644 (file)
@@ -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 {
index 7d220ef76bf5cf2554c76562dcf3c181a8e3358f..7e4a3dd25f331b901ee17914e0cc2a5cab7411f3 100644 (file)
@@ -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)
 
index 7759452e073bfb2ced46960e152bb422e1694bb3..67a74ee118db07fff73c81580d9657f7028de1ec 100644 (file)
@@ -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);
index b4a069f72722aa8b6f6e6c9029dd30c75966f183..010382376e9f7b8e3d50c6256eaaf075e6659da4 100644 (file)
@@ -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);
 
index 02a75812f5a0125934fb8def924ec9b0bd7948d7..3e431667f25ec3defcab471cd1400c8c605506c1 100644 (file)
@@ -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);
index 4a13a98ed30efb717f1c18394d474dd01da4e55a..2d4d7b4156903e35228a3c3c9b6a39019a41a46c 100644 (file)
@@ -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;
         }
index d0fb06760af80155fe4ecada1189a1b799cab231..ed0709aec2629f2e22d247d669012592d65d6332 100644 (file)
@@ -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;