Code

enable motion hints for non-freehand actions
authormental <mental@users.sourceforge.net>
Tue, 8 Jul 2008 02:32:42 +0000 (02:32 +0000)
committermental <mental@users.sourceforge.net>
Tue, 8 Jul 2008 02:32:42 +0000 (02:32 +0000)
src/arc-context.cpp
src/box3d-context.cpp
src/desktop-events.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 b8f7e30e686557d2f0f3e004ec889169eb64628e..0be96353e80ca6d3beab5cf3873e5741b4513fb1 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_MASK | GDK_BUTTON_PRESS_MASK,
+                                    GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK,
                                     NULL, event->button.time);
                 ret = TRUE;
             }
index e5acaba1f1b1d1bbb49b4a7b9ee60ce74c13ccdf..75441edb1b99c99c38ea3f077dd0fb652f644fbf 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_MASK       |
+                                  GDK_POINTER_MOTION_HINT_MASK       |
                                   GDK_BUTTON_PRESS_MASK ),
                                 NULL, event->button.time);
             ret = TRUE;
index e151f0ac918936057a552e5b83b149d1f9b6ba91..32cb341acd00b7674625030201e4ba84993b1e99 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_MASK ),
+                                      GDK_POINTER_MOTION_HINT_MASK ),
                                     NULL,
                                     event->button.time);
                 ret = TRUE;
index 017c06c166a4f47fcdbaa65a64f3de359cd8de16..6a3071d430012fb838ec11885a826aee137f1c90 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_MASK,
+                            GDK_KEY_RELEASE_MASK | GDK_BUTTON_RELEASE_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_MASK,
+                            GDK_BUTTON_RELEASE_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_MASK,
+                                GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_HINT_MASK,
                                 NULL, event->button.time);
                         ret = TRUE;
                     } else {
index 2348f4aeac61beca37e22212df4ea2b349f8838a..7d220ef76bf5cf2554c76562dcf3c181a8e3358f 100644 (file)
@@ -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_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK)
 
 static bool nograb = false;
index 18904f9313d6a46268b66bf9bc23ae194de3b46d..7759452e073bfb2ced46960e152bb422e1694bb3 100644 (file)
@@ -312,7 +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 76bdb49388362735d4235e9ec9e61f05322434c6..b4a069f72722aa8b6f6e6c9029dd30c75966f183 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_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_MASK | GDK_BUTTON_PRESS_MASK,
+                                    GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK,
                                     NULL, event->button.time);
                 sc->grabbed = SP_CANVAS_ITEM(desktop->acetate);
 
index 56c5b0ebd76bf89d1407b1e18b7d4a26ece8a483..02a75812f5a0125934fb8def924ec9b0bd7948d7 100644 (file)
@@ -272,7 +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);
                 ret = TRUE;
index c5fa5a0b975ce3907be51ad74e66e269de4da3e8..4a13a98ed30efb717f1c18394d474dd01da4e55a 100644 (file)
@@ -287,7 +287,7 @@ 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_MASK | GDK_BUTTON_PRESS_MASK,
+                                GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK,
                                 NULL, event->button.time);
             ret = TRUE;
         }
index 4b25deb9335358114453153b98365c371dcb66dd..d0fb06760af80155fe4ecada1189a1b799cab231 100644 (file)
@@ -616,7 +616,7 @@ sp_text_context_root_handler(SPEventContext *const event_context, GdkEvent *cons
                 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,
                                     NULL, event->button.time);
                 tc->grabbed = SP_CANVAS_ITEM(desktop->acetate);
                 tc->creating = 1;