After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 706783 - No longer possible to exit Message Tray mode programatically.
No longer possible to exit Message Tray mode programatically.
Status: RESOLVED OBSOLETE
Product: gnome-shell
Classification: Core
Component: message-tray
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-08-26 08:43 UTC by Colin Guthrie
Modified: 2015-03-07 05:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Colin Guthrie 2013-08-26 08:43:35 UTC
Under previous versions of gnome-shell (i.e. 3.8 and before), when the message tray was active it was possible to return to the normal desktop mode via the command:

dbus-send --session --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.freedesktop.DBus.Properties.Set string:org.gnome.Shell string:OverviewActive variant:boolean:false

Technically, this was likely considered a bug as at some point the "message tray" and the "overview" modes were split.

So my question is as follows:

 1. Should a new property be added for MessageTrayActive? (or have I missed the property I should be using?)

or 

 2. Should there be some heuristics added to notification-daemon implementation to automatically exit MessageTray mode?


To explain the latter suggestion, the reason I want this is that we have some code that displays notifications. These notifications have actions and when the action is clicked, we pop up a new window and "do stuff", however the message tray mode itself remains active. In order to fix this I added this commit a while back in our code: 
http://gitweb.mageia.org/software/mgaonline/commit/?id=1105de688292179f5e7b890dda9f54381e00c884

So I'm adding specific code downstream to do this which is not ideal (especially as this is cross-desktop code and this is gnome-specific workarounds). However, it's perhaps not crazy to assume that when you click on an action, that you want the message tray mode to exit, so perhaps this principle can be built in to the notification daemon implementation itself and work for all notification actions?

Either way, if I have to update our code that's fine, but I'd like some way to be able to get the behaviour back :)
Comment 1 Colin Guthrie 2013-08-26 10:33:45 UTC
FWIW, I'm pretty sure it worked in 3.8.* (but I could be wrong).

Currently using 3.9.90 (apologies for not including this in the report)
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-08-26 13:29:12 UTC
Notification actions should always close the tray and raise the app. There's a bug in here somewhere.
Comment 3 Colin Guthrie 2013-08-26 13:31:52 UTC
In case it has any bearing, in this case the app generating the notifications is basically headless. The windows that pop up are the result of spawning new applications. Not sure if this causes some kind of problem with the code (i.e. it cannot track the window id back to the app or something).
Comment 4 Colin Guthrie 2014-01-22 16:34:54 UTC
FWIW, programatic exit can be done via:

dbus-send --session --dest=org.gnome.Shell --print-reply=literal --type=method_call /org/gnome/Shell org.gnome.Shell.Eval string:"Main.messageTray._trayState==2 && Main.messageTray.toggle();"

At least, that worked for me.
Comment 5 Florian Müllner 2015-03-07 05:43:47 UTC
The message tray is gone now ...