workspace: Only show the close buttons for windows that can close
https://bugzilla.gnome.org/show_bug.cgi?id=699269
This commit is contained in:
parent
1eeeead78f
commit
e16c16b3ef
@ -453,6 +453,10 @@ const WindowOverlay = new Lang.Class({
|
|||||||
metaWindow.delete(global.get_current_time());
|
metaWindow.delete(global.get_current_time());
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_windowCanClose: function() {
|
||||||
|
return this._windowClone.metaWindow.can_close();
|
||||||
|
},
|
||||||
|
|
||||||
_onWindowAdded: function(workspace, win) {
|
_onWindowAdded: function(workspace, win) {
|
||||||
let metaWindow = this._windowClone.metaWindow;
|
let metaWindow = this._windowClone.metaWindow;
|
||||||
|
|
||||||
@ -488,12 +492,14 @@ const WindowOverlay = new Lang.Class({
|
|||||||
_animateVisible: function() {
|
_animateVisible: function() {
|
||||||
this._parentActor.raise_top();
|
this._parentActor.raise_top();
|
||||||
|
|
||||||
this.closeButton.show();
|
if (this._windowCanClose()) {
|
||||||
this.closeButton.opacity = 0;
|
this.closeButton.show();
|
||||||
Tweener.addTween(this.closeButton,
|
this.closeButton.opacity = 0;
|
||||||
{ opacity: 255,
|
Tweener.addTween(this.closeButton,
|
||||||
time: CLOSE_BUTTON_FADE_TIME,
|
{ opacity: 255,
|
||||||
transition: 'easeOutQuad' });
|
time: CLOSE_BUTTON_FADE_TIME,
|
||||||
|
transition: 'easeOutQuad' });
|
||||||
|
}
|
||||||
|
|
||||||
this.border.show();
|
this.border.show();
|
||||||
this.border.opacity = 0;
|
this.border.opacity = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user