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
This commit is contained in:
Dan Winship 2011-03-16 13:16:38 -04:00
parent 2782011ce8
commit 22bfd4f7c3

View File

@ -461,7 +461,18 @@ Source.prototype = {
if (event.type() != Clutter.EventType.BUTTON_RELEASE)
return false;
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;
},