diff options
Diffstat (limited to 'community/gnome-screensaver')
-rw-r--r-- | community/gnome-screensaver/PKGBUILD | 13 | ||||
-rw-r--r-- | community/gnome-screensaver/lock_screen_on_suspend.patch | 51 |
2 files changed, 60 insertions, 4 deletions
diff --git a/community/gnome-screensaver/PKGBUILD b/community/gnome-screensaver/PKGBUILD index c046302a6..9649da0d5 100644 --- a/community/gnome-screensaver/PKGBUILD +++ b/community/gnome-screensaver/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 93459 2013-07-03 14:24:20Z bgyorgy $ +# $Id: PKGBUILD 96399 2013-08-27 14:10:08Z bgyorgy $ # Maintainer: Balló György <ballogyor+arch at gmail dot com> # Contributor: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> # Contributor: Jan de Groot <jgc@archlinux.org> pkgname=gnome-screensaver pkgver=3.6.1 -pkgrel=4 +pkgrel=5 pkgdesc="Legacy GNOME screensaver" arch=('i686' 'x86_64') license=('GPL') @@ -17,11 +17,13 @@ optdepends=('gnome-themes-standard: default background') source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz gnome-screensaver.pam move-desktop-file.patch - fix-autoconf.patch) + fix-autoconf.patch + lock_screen_on_suspend.patch) sha256sums=('f39b78d4f7fed748c7f0a31d694112fb907c6d3c4e63db22eb858df07e962cd0' 'b6ea9e2eb586d94bcabb617a8f1c2958111df87afdbb51f645882bccdc15cbda' '4bb96f62aa069c83b629204a79a3f63b146bcaf773569aee8b5dd23fbcd88974' - 'c4da9c18b543ecbc781c1f103321b324a855bdd0979fd36b437f6033736ad4bb') + 'c4da9c18b543ecbc781c1f103321b324a855bdd0979fd36b437f6033736ad4bb' + '516c479558576c6c5a2509abfcbf4fdafb5953d252e7a4ab972f9db6137daca8') build() { cd "$pkgname-$pkgver" @@ -32,6 +34,9 @@ build() { # Fix build patch -Np1 -i "$srcdir/fix-autoconf.patch" + # Lock screen on suspend with systemd + patch -Np1 -i "$srcdir/lock_screen_on_suspend.patch" + autoreconf -fi ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib/$pkgname \ --with-mit-ext diff --git a/community/gnome-screensaver/lock_screen_on_suspend.patch b/community/gnome-screensaver/lock_screen_on_suspend.patch new file mode 100644 index 000000000..5c273c70e --- /dev/null +++ b/community/gnome-screensaver/lock_screen_on_suspend.patch @@ -0,0 +1,51 @@ +From f8f9beb6a3bf81240d36bfec43e5db9b102ea91e Mon Sep 17 00:00:00 2001 +From: Martin Pitt <martinpitt@gnome.org> +Date: Wed, 1 May 2013 10:55:49 -0700 +Subject: [PATCH] Lock screen on suspend + +Listen for logind's PrepareForSleep signal, and lock the screen (if configured +to do so). This mirrors what gnome-shell's screensaver does. +--- + src/gs-listener-dbus.c | 28 ++++++++++++++++++++++++++++ + src/gs-listener-dbus.h | 1 + + src/gs-monitor.c | 20 ++++++++++++++++++++ + 3 files changed, 49 insertions(+) + +diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c +index 7f718fa..49586fd 100644 +--- a/src/gs-listener-dbus.c ++++ b/src/gs-listener-dbus.c +@@ -871,6 +872,17 @@ listener_dbus_handle_system_message (DBusConnection *connection, + } + + return DBUS_HANDLER_RESULT_HANDLED; ++ } else if (dbus_message_is_signal (message, SYSTEMD_LOGIND_INTERFACE, "PrepareForSleep")) { ++ gboolean active; ++ if (dbus_message_get_args (message, NULL, ++ DBUS_TYPE_BOOLEAN, &active, ++ DBUS_TYPE_INVALID) && active) { ++ gs_debug ("systemd notified that system is about to sleep"); ++ g_signal_emit (listener, signals [LOCK], 0); ++ } else { ++ gs_debug ("cannot parse PrepareForSleep"); ++ } ++ return DBUS_HANDLER_RESULT_HANDLED; + } else if (dbus_message_is_signal (message, DBUS_INTERFACE_PROPERTIES, "PropertiesChanged")) { + + if (_listener_message_path_is_our_session (listener, message)) { +@@ -1370,6 +1392,12 @@ gs_listener_acquire (GSListener *listener, + ",interface='"DBUS_INTERFACE_PROPERTIES"'" + ",member='PropertiesChanged'", + NULL); ++ dbus_bus_add_match (listener->priv->system_connection, ++ "type='signal'" ++ ",sender='"SYSTEMD_LOGIND_SERVICE"'" ++ ",interface='"SYSTEMD_LOGIND_INTERFACE"'" ++ ",member='PrepareForSleep'", ++ NULL); + + return (res != -1); + } +-- +1.8.1.2 + |