[gnome-shell] layout: Track which barriers have been hit
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] layout: Track which barriers have been hit
- Date: Wed, 29 Apr 2015 00:50:10 +0000 (UTC)
commit 8a8abf12f99551687e52751cae6092eedd31fc8c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Apr 28 17:36:53 2015 -0700
layout: Track which barriers have been hit
For barriers like the hot corner which are made up of multiple axis
barriers, make sure that all the barriers have been left before
resetting the barrier.
js/ui/layout.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 204665f..d5780e5 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -1316,8 +1316,11 @@ const PressureBarrier = new Lang.Class({
},
_onBarrierLeft: function(barrier, event) {
- this._reset();
- this._isTriggered = false;
+ barrier._isHit = false;
+ if (this._barriers.every(function(b) { return !b._isHit; })) {
+ this._reset();
+ this._isTriggered = false;
+ }
},
_trigger: function() {
@@ -1327,6 +1330,8 @@ const PressureBarrier = new Lang.Class({
},
_onBarrierHit: function(barrier, event) {
+ barrier._isHit = true;
+
// If we've triggered the barrier, wait until the pointer has the
// left the barrier hitbox until we trigger it again.
if (this._isTriggered)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]