Browse Source

Freeze autohide when the window is grabbed.

tags/xfce4-panel-4.10.0
Nick Schermer 11 years ago
parent
commit
4a6f93cabb
2 changed files with 21 additions and 1 deletions
  1. +2
    -1
      TODO
  2. +19
    -0
      panel/panel-window.c

+ 2
- 1
TODO View File

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


+ 19
- 0
panel/panel-window.c View File

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


Loading…
Cancel
Save