[Xfce4-commits] <xfce4-panel:devel> Freeze autohide when the window is grabbed.
Nick Schermer
nick at xfce.org
Tue Aug 11 20:28:15 CEST 2009
Updating branch refs/heads/devel
to d3d26c5e28bfa8d0add3cbf7d2b9203bfa9ba3e5 (commit)
from 7455b7313950b77a5480af0376e58902c20043ec (commit)
commit d3d26c5e28bfa8d0add3cbf7d2b9203bfa9ba3e5
Author: Nick Schermer <nick at xfce.org>
Date: Sun Feb 22 17:41:33 2009 +0100
Freeze autohide when the window is grabbed.
TODO | 3 ++-
panel/panel-window.c | 19 +++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/TODO b/TODO
index 77e70cf..3d1df1f 100644
--- a/TODO
+++ b/TODO
@@ -19,13 +19,14 @@ Libxfce4panel
or use all the available area.
- Launcher and iconbox buttons with only icons so it looks nice with
a transparant panel.
+ - Implement screen-position again.
Panel
-----
- Stack panels on screen edges.
- Support for remote plugins.
- - Block on grabbed (r29412).
- Implement settings manager as socket to integrate with xfce4-settings.
+ - Make plugin positioning work.
Systray
-------
diff --git a/panel/panel-window.c b/panel/panel-window.c
index 4a9663c..7ba2719 100644
--- a/panel/panel-window.c
+++ b/panel/panel-window.c
@@ -58,6 +58,7 @@ static gboolean panel_window_button_press_event (GtkWidget *widget, GdkEventButt
static gboolean panel_window_button_release_event (GtkWidget *widget, GdkEventButton *event);
static gboolean panel_window_enter_notify_event (GtkWidget *widget, GdkEventCrossing *event);
static gboolean panel_window_leave_notify_event (GtkWidget *widget, GdkEventCrossing *event);
+static void panel_window_grab_notify (GtkWidget *widget, gboolean was_grabbed);
static void panel_window_size_request (GtkWidget *widget, GtkRequisition *requisition);
static void panel_window_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
static void panel_window_screen_changed (GtkWidget *widget, GdkScreen *previous_screen);
@@ -230,6 +231,7 @@ panel_window_class_init (PanelWindowClass *klass)
gtkwidget_class->button_release_event = panel_window_button_release_event;
gtkwidget_class->enter_notify_event = panel_window_enter_notify_event;
gtkwidget_class->leave_notify_event = panel_window_leave_notify_event;
+ gtkwidget_class->grab_notify = panel_window_grab_notify;
gtkwidget_class->size_request = panel_window_size_request;
gtkwidget_class->size_allocate = panel_window_size_allocate;
gtkwidget_class->screen_changed = panel_window_screen_changed;
@@ -1053,6 +1055,23 @@ panel_window_leave_notify_event (GtkWidget *widget,
+static void
+panel_window_grab_notify (GtkWidget *widget,
+ gboolean was_grabbed)
+{
+ PanelWindow *window = PANEL_WINDOW (widget);
+
+ /* avoid hiding the panel when the window is grabbed. this
+ * (for example) happens when the user drags in the pager plugin
+ * see bug #4597 */
+ if (was_grabbed)
+ panel_window_thaw_autohide (window);
+ else
+ panel_window_freeze_autohide (window);
+}
+
+
+
/**
* panel_window_size_request:
* @widget : the panel window.
More information about the Xfce4-commits
mailing list