Code

eliminate GDK_POINTER_MOTION_HINT_MASK that broke dragging with tablet pen with newer...
authorbuliabyak <buliabyak@users.sourceforge.net>
Sun, 21 May 2006 17:32:32 +0000 (17:32 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sun, 21 May 2006 17:32:32 +0000 (17:32 +0000)
src/desktop-events.cpp
src/event-context.cpp
src/knot.cpp
src/rect-context.cpp
src/select-context.cpp
src/text-context.cpp
src/widgets/ruler.cpp

index bab39d332b6bddd84a49890b6efe2ccb0ffb6e94..a2dc1a492bfcef863b2180273d25237db3ebfaa6 100644 (file)
@@ -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;
index d91a064bad17a234ac6822825927317fe1b63129..273251d59d44686fe70941e1c74c7c6e5df9cd61 100644 (file)
@@ -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 {
index 3ec2799bd63a11ce26a8ea00567faca3b735af80..a8d694779bb7991af1d421f7228e94ed06bf5e99 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_POINTER_MOTION_MASK | \
                         GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK)
 
 static bool nograb = false;
index a7a16fcadf6ff6b49e462f85a86458d6f9da2ff1..96a3d4cf865c2278e79f0c3a83b11c2f3857eb40 100644 (file)
@@ -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;
index 32eee593dc2645cd1ae578c944fd2c1c9f0299ae..0f57f5e8e60136cc404c531cc271518d5803e57f 100644 (file)
@@ -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);
 
index d5eaf6228a43aeb2cee9172d456385003958385d..641d8bce29b7619fd73aad57ded7b736e09138c3 100644 (file)
@@ -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;
index bd3ec28eb767b5ad7b51a259b9ff2014892245c5..5eb752377851cbc8dba1438a281774fdbbfc9c67 100644 (file)
@@ -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;