debian/patches: Add 1003_mate-screensaver-command-Support-unlocking-unlock-th.patch . SUpport unlocking the screensaver via mate-screensaver-command.
This commit is contained in:
97
debian/patches/1003_mate-screensaver-command-Support-unlocking-unlock-th.patch
vendored
Normal file
97
debian/patches/1003_mate-screensaver-command-Support-unlocking-unlock-th.patch
vendored
Normal file
@ -0,0 +1,97 @@
|
||||
From 148755e195cc36207fcae23d24532d63c94fc424 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
|
||||
Date: Fri, 18 Jan 2019 14:49:21 +0100
|
||||
Subject: [PATCH] mate-screensaver-command: Support unlocking (--unlock) the
|
||||
screensaver via CLI.
|
||||
|
||||
---
|
||||
src/gs-listener-dbus.c | 7 +++++++
|
||||
src/mate-screensaver-command.c | 9 +++++++++
|
||||
2 files changed, 16 insertions(+)
|
||||
|
||||
--- a/src/gs-listener-dbus.c
|
||||
+++ b/src/gs-listener-dbus.c
|
||||
@@ -1373,6 +1373,8 @@
|
||||
" <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 @@
|
||||
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);
|
||||
--- 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 @@
|
||||
N_("Tells the running screensaver process to lock the screen immediately"), NULL
|
||||
},
|
||||
{
|
||||
+ "unlock", 'l', 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 @@
|
||||
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);
|
||||
--- a/doc/dbus-interface.xml
|
||||
+++ b/doc/dbus-interface.xml
|
||||
@@ -52,6 +52,15 @@
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
+ <sect2 id="gs-method-Unlock">
|
||||
+ <title>
|
||||
+ <literal>Unlock</literal>
|
||||
+ </title>
|
||||
+ <para>
|
||||
+ Request that the screen be unlocked.
|
||||
+ </para>
|
||||
+ </sect2>
|
||||
+
|
||||
<sect2 id="gs-method-Cycle">
|
||||
<title>
|
||||
<literal>Cycle</literal>
|
||||
--- a/data/mate-screensaver-command.1
|
||||
+++ b/data/mate-screensaver-command.1
|
||||
@@ -35,6 +35,9 @@
|
||||
.B \-l, \-\-lock
|
||||
Tells the running screensaver process to lock the screen immediately
|
||||
.TP
|
||||
+.B \-l, \-\-unlock
|
||||
+Tells the running screensaver process to unlock the screen immediately
|
||||
+.TP
|
||||
.B \-c, \-\-cycle
|
||||
If the screensaver is active then switch to another graphics demo
|
||||
.TP
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -1 +1,2 @@
|
||||
1001_add-keywords-to-desktop-files.patch
|
||||
1003_mate-screensaver-command-Support-unlocking-unlock-th.patch
|
||||
|
Reference in New Issue
Block a user