Comment 5 for bug 1250262

Revision history for this message
Charles Kerr (charlesk) wrote : Re: Selecting power-cog > restart lands highlight on "shutdown"

This isn't an indicator-session bug. Unity's popup gives focus to the Shutdown button even when the client specifies Reboot.

From UnityCore/GnomeSessionManagerImpl.h:

> enum class Action : unsigned {
> LOGOUT = 0,
> SHUTDOWN,
> REBOOT,
> NONE
> };

So calling org.gnome.SessionManager.EndSessionDialog.Open with an action type of '2' to correspond with the REBOOT enum should give focus to the dialog's Restart button, but doesn't. Repeatable by invoking from outside indicator-session w/dbus-send:

> dbus-send --print-reply --dest="org.gnome.Shell" /org/gnome/SessionManager/EndSessionDialog org.gnome.SessionManager.EndSessionDialog.Open uint32:2 uint32:0 uint32:60 array:objpath: