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/gs-listener-dbus.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/gs-listener-dbus.c')
-rw-r--r-- | src/gs-listener-dbus.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c index d398601..a37e3f9 100644 --- a/src/gs-listener-dbus.c +++ b/src/gs-listener-dbus.c @@ -1373,6 +1373,8 @@ do_introspect (DBusConnection *connection, " <interface name=\"org.mate.ScreenSaver\">\n" " <method name=\"Lock\">\n" " </method>\n" + " <method name=\"Unlock\">\n" + " </method>\n" " <method name=\"Cycle\">\n" " </method>\n" " <method name=\"SimulateUserActivity\">\n" @@ -1465,6 +1467,11 @@ listener_dbus_handle_session_message (DBusConnection *connection, g_signal_emit (listener, signals [LOCK], 0); return DBUS_HANDLER_RESULT_HANDLED; } + if (dbus_message_is_method_call (message, GS_LISTENER_SERVICE, "Unlock")) + { + gs_listener_set_active (listener, FALSE); + return DBUS_HANDLER_RESULT_HANDLED; + } if (dbus_message_is_method_call (message, GS_LISTENER_SERVICE, "Quit")) { g_signal_emit (listener, signals [QUIT], 0); |