[gnome-shell] workspace: Simplify the close button's timeout handler
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspace: Simplify the close button's timeout handler
- Date: Wed, 24 Nov 2010 18:05:42 +0000 (UTC)
commit 01e7d6f30e288dad056b6496170607b0751eb0f4
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Nov 24 18:58:43 2010 +0100
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.
js/ui/workspace.js | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 349c87b..3e80d5a 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -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;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]