Commit b3b6d74f authored by Michael Catanzaro's avatar Michael Catanzaro

manager: set phase to running before clearing inhibitors

e83da6fb introduced a regression where
clicking cancel on the power off dialog causes the dialog to reopen
itself in case any JIT inhibitor has been taken, since the inhibitors
are removed here and removing the inhibitor causing the dialog to reopen
to support functionality that was removed from gnome-shell three years
ago. To fix this, set the manager phase to running before removing the
inhibitors to ensure the power off dialog does not reopen.

https://bugzilla.gnome.org/show_bug.cgi?id=728151
parent 57db34d0
......@@ -1071,6 +1071,11 @@ cancel_end_session (GsmManager *manager)
g_cancellable_cancel (manager->priv->end_session_cancellable);
gsm_manager_set_phase (manager, GSM_MANAGER_PHASE_RUNNING);
manager->priv->logout_mode = GSM_MANAGER_LOGOUT_MODE_NORMAL;
manager->priv->logout_type = GSM_MANAGER_LOGOUT_NONE;
/* clear all JIT inhibitors */
gsm_store_foreach_remove (manager->priv->inhibitors,
(GsmStoreFunc)inhibitor_is_jit,
......@@ -1080,11 +1085,6 @@ cancel_end_session (GsmManager *manager)
(GsmStoreFunc)_client_cancel_end_session,
NULL);
gsm_manager_set_phase (manager, GSM_MANAGER_PHASE_RUNNING);
manager->priv->logout_mode = GSM_MANAGER_LOGOUT_MODE_NORMAL;
manager->priv->logout_type = GSM_MANAGER_LOGOUT_NONE;
start_phase (manager);
}
......
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