aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Uebernickel <lars@uebernic.de>2015-03-10 12:14:50 +0100
committerLars Uebernickel <lars@uebernic.de>2015-03-10 12:14:50 +0100
commit07a302702226efe27e7e69fbe9643ed31f839f66 (patch)
tree75b9ac69090dad7f6d98a46ab86606ef4fa14abb
parentfced82c1974545a30cb406fabbf8951734641ec3 (diff)
downloadayatana-ido-07a302702226efe27e7e69fbe9643ed31f839f66.tar.gz
ayatana-ido-07a302702226efe27e7e69fbe9643ed31f839f66.tar.bz2
ayatana-ido-07a302702226efe27e7e69fbe9643ed31f839f66.zip
idoscalemenuitem: translate motion event coordinates
Fixes hover theming.
-rw-r--r--src/idoscalemenuitem.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/idoscalemenuitem.c b/src/idoscalemenuitem.c
index 9898b63..3b34ea4 100644
--- a/src/idoscalemenuitem.c
+++ b/src/idoscalemenuitem.c
@@ -574,6 +574,15 @@ ido_scale_menu_item_motion_notify_event (GtkWidget *menuitem,
gtk_widget_get_allocation (priv->scale, &alloc);
gtk_widget_translate_coordinates (menuitem, priv->scale, event->x, event->y, &x, &y);
+ /* don't translate coordinates when the scale has the "grab" -
+ * GtkRange expects coords relative to its event window in that case
+ */
+ if (!priv->grabbed)
+ {
+ event->x = x;
+ event->y = y;
+ }
+
if (priv->grabbed ||
(x > 0 && x < alloc.width && y > 0 && y < alloc.height))
gtk_widget_event (priv->scale, (GdkEvent *) event);