[Xfce4-commits] r29412 - in xfce4-panel/trunk: . panel

Nick Schermer nick at xfce.org
Fri Jan 30 20:20:31 CET 2009


Author: nick
Date: 2009-01-30 19:20:31 +0000 (Fri, 30 Jan 2009)
New Revision: 29412

Modified:
   xfce4-panel/trunk/NEWS
   xfce4-panel/trunk/panel/panel-properties.c
Log:
Block panel autohide if the widget is grabbed (bug #4597).


Modified: xfce4-panel/trunk/NEWS
===================================================================
--- xfce4-panel/trunk/NEWS	2009-01-30 09:02:34 UTC (rev 29411)
+++ xfce4-panel/trunk/NEWS	2009-01-30 19:20:31 UTC (rev 29412)
@@ -1,3 +1,8 @@
+4.x.xx
+======
+- Block panel autohide if the widget is grabbed (bug #4597).
+
+
 4.5.99.1
 ========
 - Fixed extern char** environ is not defined on BSD platforms (bug #4834).

Modified: xfce4-panel/trunk/panel/panel-properties.c
===================================================================
--- xfce4-panel/trunk/panel/panel-properties.c	2009-01-30 09:02:34 UTC (rev 29411)
+++ xfce4-panel/trunk/panel/panel-properties.c	2009-01-30 19:20:31 UTC (rev 29412)
@@ -68,6 +68,8 @@
                                          GdkEventCrossing *event);
 static void     panel_leave             (Panel            *p,
                                          GdkEventCrossing *event);
+static void     panel_grabbed           (Panel            *p,
+                                         gboolean          was_grabbed);
 
 
 
@@ -896,6 +898,19 @@
 }
 
 static void
+panel_grabbed (Panel    *panel,
+               gboolean  was_grabbed)
+{
+    PanelPrivate *priv = panel->priv;
+
+    /* block the panel if the widget is grabbed */
+    if (was_grabbed)
+        priv->block_autohide--;
+    else
+        priv->block_autohide++;
+}
+
+static void
 _window_mapped (Panel *panel)
 {
     PanelPrivate *priv;
@@ -941,6 +956,9 @@
     g_signal_connect (G_OBJECT (panel), "leave-notify-event",
                       G_CALLBACK (panel_leave), NULL);
 
+    g_signal_connect (G_OBJECT (panel), "grab-notify",
+                      G_CALLBACK (panel_grabbed), NULL);
+
     g_signal_connect (G_OBJECT (panel), "map",
                       G_CALLBACK (_window_mapped), NULL);
 




More information about the Xfce4-commits mailing list