[gnome-shell/wip/message-tray: 12/24] messageTray: Make modal
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray: 12/24] messageTray: Make modal
- Date: Wed, 15 Aug 2012 18:03:03 +0000 (UTC)
commit 4e939af13b89c14f99df6dddcb2c38fb5fe8674a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Aug 10 17:03:12 2012 -0300
messageTray: Make modal
js/ui/messageTray.js | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index cfd9faa..f761893 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -1863,6 +1863,13 @@ const MessageTray = new Lang.Class({
transition: 'easeOutQuad'
});
+ // Don't actually take a modal grab in the overview.
+ // Just add something to the grab stack that we can
+ // pop later.
+ this._grabHelper.grab({ actor: this.actor,
+ modal: !this._overviewVisible,
+ onUngrab: Lang.bind(this, this._escapeTray) });
+
// Don't move the windows up if we are in the overview.
if (this._overviewVisible)
return;
@@ -1894,6 +1901,11 @@ const MessageTray = new Lang.Class({
},
_hideTray: function() {
+ // Note that we might have entered here without a grab,
+ // which would happen if GrabHelper ungrabbed for us.
+ // This is a no-op in that case.
+ this._grabHelper.ungrab({ actor: this.actor });
+
this._tween(this.actor, '_trayState', State.HIDDEN,
{ y: 0,
time: ANIMATION_TIME,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]