[gnome-shell] notificationDaemon: handle trayicon clicks in the overview
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] notificationDaemon: handle trayicon clicks in the overview
- Date: Mon, 21 Mar 2011 18:58:33 +0000 (UTC)
commit 22bfd4f7c3e2e0f208f143c9939b7edbc5ddefbd
Author: Dan Winship <danw gnome org>
Date: Wed Mar 16 13:16:38 2011 -0400
notificationDaemon: handle trayicon clicks in the overview
If the user clicks a trayicon in the overview, drop out of the
overview before passing the click on to the icon. (We have to actually
wait for the overview animation to complete, in case the icon wants to
get a pointer grab, which it would not be able to do with the overview
active.)
https://bugzilla.gnome.org/show_bug.cgi?id=641853
js/ui/notificationDaemon.js | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index c3c1e34..2a59d98 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -461,7 +461,18 @@ Source.prototype = {
if (event.type() != Clutter.EventType.BUTTON_RELEASE)
return false;
- this._trayIcon.click(event);
+ if (Main.overview.visible) {
+ // We can't just connect to Main.overview's 'hidden' signal,
+ // because it's emitted *before* it calls popModal()...
+ let id = global.connect('notify::stage-input-mode', Lang.bind(this,
+ function () {
+ global.disconnect(id);
+ this._trayIcon.click(event);
+ }));
+ Main.overview.hide();
+ } else {
+ this._trayIcon.click(event);
+ }
return true;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]