[Goodies-dev] [Bug 16317] the time left dialog needs a lock button
bugzilla-daemon at xfce.org
bugzilla-daemon at xfce.org
Mon Dec 30 19:07:51 CET 2019
https://bugzilla.xfce.org/show_bug.cgi?id=16317
--- Comment #2 from Joshua Cogliati <jjcogliati-r1 at yahoo.com> ---
Switching to g_spawn_command_line_sync sorta solves the problem. However, with
xscreensaver, it doesn't always start until the mouse is moved (as in, click
Lock, then wait a moment, then move the mouse)
Here is the second attempt at the code (with debugging statements left in:
static void
time_out_lock (TimeOutLockScreen *lock_screen,
TimeOutPlugin *time_out)
{
GError *error = NULL;
gboolean succeed = FALSE;
gint exit_status;
{
FILE *fp;
fp = fopen ("/tmp/panel_out", "a+");
fputs("in time_out_lock\n", fp);
fclose(fp);
}
g_return_if_fail (IS_TIME_OUT_LOCK_SCREEN (lock_screen));
g_return_if_fail (time_out != NULL);
/* Unlock the screen so screensaver can show */
time_out_lock_screen_hide (time_out->lock_screen);
/* Lock screen and check for errors */
//succeed = g_spawn_command_line_async ("xflock4", &error);
//g_usleep (10*1000);
succeed = g_spawn_command_line_sync ("xflock4", NULL, NULL, &exit_status ,
&error);
{
FILE *fp;
fp = fopen ("/tmp/panel_out", "a+");
fprintf(fp, "exit status %d\n", exit_status);
if (succeed) {
fputs("locked screen\n", fp);
} else {
fputs("failed to lock screen\n", fp);
}
fclose(fp);
}
if (!succeed)
{
xfce_dialog_show_error (NULL, error,
_("Failed to lock screen"));
} else {
/* Display the lock screen under screensaver */
time_out_lock_screen_show (time_out->lock_screen,
time_out->lock_countdown_seconds);
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Goodies-dev
mailing list