[gnome-shell] workspace: Don't allow closing windows with attached modals
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspace: Don't allow closing windows with attached modals
- Date: Wed, 28 May 2014 20:05:04 +0000 (UTC)
commit 3ff4277f86542420524a59ed99b6b81075c558c2
Author: Florian Müllner <fmuellner gnome org>
Date: Thu May 8 11:21:34 2014 +0200
workspace: Don't allow closing windows with attached modals
Modal dialogs prevent the parent from being closed in "normal mode",
so it makes sense to not allow it in the overview either.
https://bugzilla.gnome.org/show_bug.cgi?id=729886
js/ui/workspace.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 2c49d60..51b7e84 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -200,6 +200,10 @@ const WindowClone = new Lang.Class({
this.emit('size-changed');
},
+ hasAttachedDialogs: function() {
+ return this.actor.get_n_children() > 1;
+ },
+
_doAddAttachedDialog: function(metaWin, realWin) {
let clone = new Clutter.Clone({ source: realWin });
clone._updateId = metaWin.connect('size-changed', Lang.bind(this, function() {
@@ -582,7 +586,8 @@ const WindowOverlay = new Lang.Class({
},
_windowCanClose: function() {
- return this._windowClone.metaWindow.can_close();
+ return this._windowClone.metaWindow.can_close() &&
+ !this._windowClone.hasAttachedDialogs();
},
_onWindowAdded: function(workspace, win) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]