Browse Source

Block panel autohide if the widget is grabbed (bug #4597).

(Old svn revision: 29412)
upstream/xfce4-panel-4.10.1
Nick Schermer 13 years ago
parent
commit
6cb2c5b7fa
  1. 5
      NEWS
  2. 18
      panel/panel-properties.c

5
NEWS

@ -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).

18
panel/panel-properties.c

@ -68,6 +68,8 @@ static void panel_enter (Panel *p,
GdkEventCrossing *event);
static void panel_leave (Panel *p,
GdkEventCrossing *event);
static void panel_grabbed (Panel *p,
gboolean was_grabbed);
@ -895,6 +897,19 @@ panel_leave (Panel *panel,
}
}
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)
{
@ -941,6 +956,9 @@ void panel_init_signals (Panel *panel)
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);

Loading…
Cancel
Save