[gnome-shell/wip/message-tray-menu: 67/109] workspace: Only show the close buttons for windows that can close
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray-menu: 67/109] workspace: Only show the close buttons for windows that can close
- Date: Thu, 9 May 2013 15:41:59 +0000 (UTC)
commit de2d677e9b3af1ca203ae4d34eef5e15be4ff3ef
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Apr 26 11:32:40 2013 -0400
workspace: Only show the close buttons for windows that can close
https://bugzilla.gnome.org/show_bug.cgi?id=699269
js/ui/workspace.js | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 6395208..bf5d277 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -453,6 +453,10 @@ const WindowOverlay = new Lang.Class({
metaWindow.delete(global.get_current_time());
},
+ _windowCanClose: function() {
+ return this._windowClone.metaWindow.can_close();
+ },
+
_onWindowAdded: function(workspace, win) {
let metaWindow = this._windowClone.metaWindow;
@@ -488,12 +492,14 @@ const WindowOverlay = new Lang.Class({
_animateVisible: function() {
this._parentActor.raise_top();
- this.closeButton.show();
- this.closeButton.opacity = 0;
- Tweener.addTween(this.closeButton,
- { opacity: 255,
- time: CLOSE_BUTTON_FADE_TIME,
- transition: 'easeOutQuad' });
+ if (this._windowCanClose()) {
+ this.closeButton.show();
+ this.closeButton.opacity = 0;
+ Tweener.addTween(this.closeButton,
+ { opacity: 255,
+ time: CLOSE_BUTTON_FADE_TIME,
+ transition: 'easeOutQuad' });
+ }
this.border.show();
this.border.opacity = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]