From 2cfee4d934699d56f77f7df33659a781856fdcf3 Mon Sep 17 00:00:00 2001 From: Simon Steinbeiss Date: Thu, 27 Nov 2014 01:23:04 +0100 Subject: [PATCH] Fix panel being initially hidden with intelligent autohiding After closing the panel preferences, the panel was always hidden when intelligent autohiding was selected. This patch adds a check whether the currently active window actually overlaps with the panel and only hides it in case it does. --- panel/panel-window.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/panel/panel-window.c b/panel/panel-window.c index e7d670c..52f3186 100644 --- a/panel/panel-window.c +++ b/panel/panel-window.c @@ -2911,8 +2911,14 @@ panel_window_thaw_autohide (PanelWindow *window) window->autohide_block--; if (window->autohide_block == 0 - && window->autohide_state != AUTOHIDE_DISABLED) - panel_window_autohide_queue (window, AUTOHIDE_POPDOWN); + && window->autohide_state != AUTOHIDE_DISABLED) { + /* simulate a geometry change to check for overlapping windows with intelligent hiding */ + if (window->autohide_behavior == AUTOHIDE_BEHAVIOR_INTELLIGENTLY) + panel_window_active_window_geometry_changed (window->wnck_active_window, window); + /* otherwise just hide the panel */ + else + panel_window_autohide_queue (window, AUTOHIDE_POPDOWN); + } } -- 1.9.1