[gnome-shell] grabHelper: Make sure to return not null when the stack contains fake grabs
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] grabHelper: Make sure to return not null when the stack contains fake grabs
- Date: Mon, 20 Aug 2012 01:19:49 +0000 (UTC)
commit eebab34b62ee0c78e99f29e628032f04d511887e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Aug 19 19:12:02 2012 -0400
grabHelper: Make sure to return not null when the stack contains fake grabs
We did this if there's nothing in the grab stack, but didn't do this
when there's no real grabs in the grab stack.
js/ui/grabHelper.js | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js
index 4a72351..ac65351 100644
--- a/js/ui/grabHelper.js
+++ b/js/ui/grabHelper.js
@@ -84,14 +84,11 @@ const GrabHelper = new Lang.Class({
},
get currentGrab() {
- if (!this._grabStack.length)
- return {};
-
let idx = this._grabStack.length - 1;
while (idx >= 0 && this._grabStack[idx].untracked)
idx--;
- return this._grabStack[idx];
+ return this._grabStack[idx] || {};
},
_findStackIndex: function(actor) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]