diff options
author | Mike Gabriel <[email protected]> | 2019-01-20 01:10:51 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-01-25 12:56:40 +0100 |
commit | 11fedfe00a34bc986efede88e1f2d2e8000881ab (patch) | |
tree | 8ab63cd71fbabf93f1eda24859e4a4d1bd0ba443 /src/mate-screensaver-command.c | |
parent | 84a14f04352313e59ffc8849bdae5fcfd5c7c682 (diff) | |
download | mate-screensaver-11fedfe00a34bc986efede88e1f2d2e8000881ab.tar.bz2 mate-screensaver-11fedfe00a34bc986efede88e1f2d2e8000881ab.tar.xz |
mate-screensaver-command: Support unlocking (--unlock) the screensaver via CLI.
Diffstat (limited to 'src/mate-screensaver-command.c')
-rw-r--r-- | src/mate-screensaver-command.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mate-screensaver-command.c b/src/mate-screensaver-command.c index 11feb8b..60c6001 100644 --- a/src/mate-screensaver-command.c +++ b/src/mate-screensaver-command.c @@ -39,6 +39,7 @@ static gboolean do_quit = FALSE; static gboolean do_lock = FALSE; +static gboolean do_unlock = FALSE; static gboolean do_cycle = FALSE; static gboolean do_activate = FALSE; static gboolean do_deactivate = FALSE; @@ -71,6 +72,10 @@ static GOptionEntry entries [] = N_("Tells the running screensaver process to lock the screen immediately"), NULL }, { + "unlock", 'u', 0, G_OPTION_ARG_NONE, &do_unlock, + N_("Tells the running screensaver process to unlock the screen immediately"), NULL + }, + { "cycle", 'c', 0, G_OPTION_ARG_NONE, &do_cycle, N_("If the screensaver is active then switch to another graphics demo"), NULL }, @@ -423,6 +428,11 @@ do_command (DBusConnection *connection) reply = screensaver_send_message_void (connection, "Lock", FALSE); } + if (do_unlock) + { + reply = screensaver_send_message_void (connection, "Unlock", FALSE); + } + if (do_cycle) { reply = screensaver_send_message_void (connection, "Cycle", FALSE); |