[Xfce4-commits] [xfce/xfce4-power-manager] 20/63: Fix hover effect on the scale's slider
noreply at xfce.org
noreply at xfce.org
Sun Mar 22 13:02:15 CET 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.
commit 483ee8b3cf840d2a777759f09a300bee40976704
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed Mar 11 23:55:07 2015 +0100
Fix hover effect on the scale's slider
Borrowed from upstream libido, thanks to Lars Uebernickel.
---
panel-plugins/power-manager-plugin/scalemenuitem.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/panel-plugins/power-manager-plugin/scalemenuitem.c b/panel-plugins/power-manager-plugin/scalemenuitem.c
index 3a598e4..72b09ea 100644
--- a/panel-plugins/power-manager-plugin/scalemenuitem.c
+++ b/panel-plugins/power-manager-plugin/scalemenuitem.c
@@ -306,6 +306,15 @@ 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 (scale, (GdkEvent*)event);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list