From dbd04df31111344206a04d867e6b579064d850c8 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Mon, 22 Aug 2016 16:56:41 +0200 Subject: [PATCH] windowManager: Fix windows not getting undimmed in some cases meta_window_foreach_transient() iterates through all transients of a window, not only direct transients. This means that simply checking if a transient is an attached dialog isn't enough because it might be a non-direct transient for the window we're checking, in which case we don't want to dim the window. In particular this fixes windows not getting undimmed when they have more that one level of transient children and the direct transient gets destroyed. In that case we would still find at least one non-direct transient child and decide to keep the window dimmed. https://bugzilla.gnome.org/show_bug.cgi?id=770163 --- js/ui/windowManager.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js index 51ce482c4..5222b986d 100644 --- a/js/ui/windowManager.js +++ b/js/ui/windowManager.js @@ -1349,9 +1349,13 @@ const WindowManager = new Lang.Class({ _hasAttachedDialogs: function(window, ignoreWindow) { var count = 0; window.foreach_transient(function(win) { - if (win != ignoreWindow && win.is_attached_dialog()) + if (win != ignoreWindow && + win.is_attached_dialog() && + win.get_transient_for() == window) { count++; - return false; + return false; + } + return true; }); return count != 0; },