Code

Switched pen and pencil toobars to stock GTK+ toolbars
[inkscape.git] / src / widgets / ruler.cpp
index bd3ec28eb767b5ad7b51a259b9ff2014892245c5..c4ff1746c03a1db39c535871d5a7e6440fc6d329 100644 (file)
@@ -14,6 +14,7 @@
  */
 
 #include <cmath>
+#include <cstdio>
 #include <string.h>
 #include "widget-sizes.h"
 #include "ruler.h"
@@ -104,10 +105,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 +406,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;