[gnome-shell/wip/message-tray: 27/35] grabHelper: Make sure to call onUngrabbed for all popped actors
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray: 27/35] grabHelper: Make sure to call onUngrabbed for all popped actors
- Date: Sun, 19 Aug 2012 23:15:14 +0000 (UTC)
commit e7b25df32235380b6fc2dbcd6467bb8a23951db1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Aug 16 13:48:22 2012 -0400
grabHelper: Make sure to call onUngrabbed for all popped actors
js/ui/grabHelper.js | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js
index a330c04..780377f 100644
--- a/js/ui/grabHelper.js
+++ b/js/ui/grabHelper.js
@@ -207,6 +207,7 @@ const GrabHelper = new Lang.Class({
return;
let poppedGrab = this._grabStack[grabStackIndex];
+ let poppedGrabs = this._grabStack.slice(grabStackIndex);
// "Pop" poppedGrab and everything after off by truncating the array.
this._grabStack.length = grabStackIndex;
@@ -218,8 +219,10 @@ const GrabHelper = new Lang.Class({
let focus = global.stage.key_focus;
let hadFocus = focus && this._isWithinGrabbedActor(focus);
- if (poppedGrab.onUngrab)
- poppedGrab.onUngrab();
+ for (let i = 0; i < poppedGrabs.length; i++) {
+ if (poppedGrabs[i].onUngrab)
+ poppedGrabs[i].onUngrab();
+ }
// If we took away the last grab, ungrab ourselves.
if (this._grabStack.length == 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]