Commit 74fef0a9 authored by David Edmundson's avatar David Edmundson
Browse files

[libkworkspace] Interim fix for the logout issue

Calls to a DBus activated service can fail if the sender quits whilst
the service is spawning
(https://gitlab.freedesktop.org/dbus/dbus/-/issues/72) and using
dbus-daemon.

This is a lazy interim fix that just makes these calls block as proper
fixes will require more work.

BUG: 432460


(cherry picked from commit 81d61861)
parent b05cb534
......@@ -130,10 +130,10 @@ void SessionManagement::requestShutdown(ConfirmationMode confirmationMode)
}
if (confirm) {
LogoutPromptIface iface;
iface.promptShutDown();
iface.promptShutDown().waitForFinished();
} else {
ShutdownIface iface;
iface.logoutAndShutdown();
iface.logoutAndShutdown().waitForFinished();
}
}
......@@ -148,10 +148,10 @@ void SessionManagement::requestReboot(ConfirmationMode confirmationMode)
}
if (confirm) {
LogoutPromptIface iface;
iface.promptReboot();
iface.promptReboot().waitForFinished();
} else {
ShutdownIface iface;
iface.logoutAndReboot();
iface.logoutAndReboot().waitForFinished();
}
}
......@@ -166,10 +166,10 @@ void SessionManagement::requestLogout(ConfirmationMode confirmationMode)
}
if (confirm) {
LogoutPromptIface iface;
iface.promptLogout();
iface.promptLogout().waitForFinished();
} else {
ShutdownIface iface;
iface.logout();
iface.logout().waitForFinished();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment