workspace: Simplify the close button's timeout handler
Clutter actor gained a :has_pointer property after the original code was written, so use this instead of picking.
This commit is contained in:
parent
d6f1c10b1b
commit
01e7d6f30e
@ -534,12 +534,10 @@ WindowOverlay.prototype = {
|
|||||||
|
|
||||||
_idleToggleCloseButton: function() {
|
_idleToggleCloseButton: function() {
|
||||||
this._idleToggleCloseId = 0;
|
this._idleToggleCloseId = 0;
|
||||||
let [x, y, mask] = global.get_pointer();
|
if (!this._windowClone.actor.has_pointer &&
|
||||||
let actor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE,
|
!this.closeButton.has_pointer)
|
||||||
x, y);
|
|
||||||
if (actor != this._windowClone.actor && actor != this.closeButton) {
|
|
||||||
this.closeButton.hide();
|
this.closeButton.hide();
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user