summaryrefslogtreecommitdiffstats
path: root/src/widgets/ruler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/ruler.cpp')
-rw-r--r--src/widgets/ruler.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp
index bd3ec28eb..5eb752377 100644
--- a/src/widgets/ruler.cpp
+++ b/src/widgets/ruler.cpp
@@ -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;