session: Try dbus before SM/ICE on logout/shutdown
Otherwise we will not get the Shutdown/Reboot dialog but always the Logout one (with dbus and SM both enabled).
This commit is contained in:
parent
355663252d
commit
29b1cfbaad
|
@ -564,25 +564,26 @@ _SessionExitDbus(int how)
|
||||||
static void
|
static void
|
||||||
_SessionLogout(int how)
|
_SessionLogout(int how)
|
||||||
{
|
{
|
||||||
#if USE_SM
|
#ifdef USE_SM
|
||||||
if (EDebug(EDBUG_TYPE_SESSION))
|
if (EDebug(EDBUG_TYPE_SESSION))
|
||||||
Eprintf("%s: how=%d smc=%p\n", __func__, how, sm_conn);
|
Eprintf("%s: how=%d smc=%p\n", __func__, how, sm_conn);
|
||||||
|
#else
|
||||||
|
if (EDebug(EDBUG_TYPE_SESSION))
|
||||||
|
Eprintf("%s: how=%d\n", __func__, how);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if USE_DBUS
|
||||||
|
if (_SessionExitDbus(how) == 0)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if USE_SM
|
||||||
if (sm_conn)
|
if (sm_conn)
|
||||||
{
|
{
|
||||||
SmcRequestSaveYourself(sm_conn, SmSaveBoth, True, SmInteractStyleAny,
|
SmcRequestSaveYourself(sm_conn, SmSaveBoth, True, SmInteractStyleAny,
|
||||||
False, True);
|
False, True);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
if (EDebug(EDBUG_TYPE_SESSION))
|
|
||||||
Eprintf("%s: how=%d\n", __func__, how);
|
|
||||||
|
|
||||||
#endif /* USE_SM */
|
|
||||||
|
|
||||||
#if USE_DBUS
|
|
||||||
if (_SessionExitDbus(how) == 0)
|
|
||||||
return;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch (how)
|
switch (how)
|
||||||
|
|
Loading…
Reference in New Issue