diff options
-rw-r--r-- | src/idoscalemenuitem.c | 9 |
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); |