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:
Florian Müllner 2010-11-24 18:58:43 +01:00
parent d6f1c10b1b
commit 01e7d6f30e

View File

@ -534,12 +534,10 @@ WindowOverlay.prototype = {
_idleToggleCloseButton: function() {
this._idleToggleCloseId = 0;
let [x, y, mask] = global.get_pointer();
let actor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE,
x, y);
if (actor != this._windowClone.actor && actor != this.closeButton) {
if (!this._windowClone.actor.has_pointer &&
!this.closeButton.has_pointer)
this.closeButton.hide();
}
return false;
},