X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fwidgets%2Fruler.cpp;h=c4ff1746c03a1db39c535871d5a7e6440fc6d329;hb=7ec2a593a4a4046d6313fc868bd32ca1a5b2a119;hp=bd3ec28eb767b5ad7b51a259b9ff2014892245c5;hpb=6b15695578f07a3f72c4c9475c1a261a3021472a;p=inkscape.git diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp index bd3ec28eb..c4ff1746c 100644 --- a/src/widgets/ruler.cpp +++ b/src/widgets/ruler.cpp @@ -14,6 +14,7 @@ */ #include +#include #include #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;