When the system will suspend, e.g. after inactivity or pressing the suspend button, if the power manager fails to lock the screen, a dialog is presented asking if the user still wants to suspend. The response is ignored and the system suspends regardless. I expect that answering "No" will not suspend the system. The following fixed it for me. diff --git a/src/xfpm-power.c b/src/xfpm-power.c index 172cff8..258c795 100644 --- a/src/xfpm-power.c +++ b/src/xfpm-power.c @@ -442,7 +442,7 @@ xfpm_power_sleep (XfpmPower *power, const gchar *sleep_time, gboolean force) ret = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); - if ( !ret ) + if ( !ret || ret == GTK_RESPONSE_NO) return; } }
Created attachment 7038 Fix by acknowledging the user response
Thanks for your report and the fix, the patch will be included in the next version of xfpm.
Simon Steinbeiss referenced this bugreport in commit f911ceb07c5f78fe72887f5438999edb2d7f6d09 Fix handling of dialog responses for suspend and hibernate (Bug #13405) https://git.xfce.org/xfce/xfce4-power-manager/commit?id=f911ceb07c5f78fe72887f5438999edb2d7f6d09
I took the liberty of fixing the same thing for the hibernate dialog too. Thanks for catching the bug and providing a patch!