[gnome-shell] windowManager: Fix windows not getting undimmed in some cases
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] windowManager: Fix windows not getting undimmed in some cases
- Date: Fri, 9 Sep 2016 15:18:02 +0000 (UTC)
commit dbd04df31111344206a04d867e6b579064d850c8
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Aug 22 16:56:41 2016 +0200
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 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index 51ce482..5222b98 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;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]