xfce4-session/xfce4-session-lock-screen-on-suspend-hibernate.patch
Stephan Kulow 8d498f1e27 Accepting request 96693 from X11:xfce
- added xfce4-session-lock-screen-on-suspend-hibernate.patch in
  order to try to locking the screen when hibernating/suspending
  (bxo#6019)

OBS-URL: https://build.opensuse.org/request/show/96693
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xfce4-session?expand=0&rev=48
2011-12-15 15:08:08 +00:00

33 lines
1.1 KiB
Diff

Index: xfce4-session-4.8.2/xfce4-session/xfsm-shutdown-helper.c
===================================================================
--- xfce4-session-4.8.2.orig/xfce4-session/xfsm-shutdown-helper.c
+++ xfce4-session-4.8.2/xfce4-session/xfsm-shutdown-helper.c
@@ -1783,8 +1783,13 @@ gboolean xfsm_shutdown_helper_restart (X
**/
gboolean xfsm_shutdown_helper_suspend (XfsmShutdownHelper *helper, GError **error)
{
+ gboolean ret;
g_return_val_if_fail (!error || !*error, FALSE);
+ ret = g_spawn_command_line_async ("xflock4", NULL);
+ if (!ret)
+ g_warning("Could not lock screen");
+
#ifdef ENABLE_UPOWER
if ( helper->sleep_backend == XFSM_SLEEP_BACKEND_UPOWER )
{
@@ -1810,8 +1815,13 @@ gboolean xfsm_shutdown_helper_suspend (X
**/
gboolean xfsm_shutdown_helper_hibernate (XfsmShutdownHelper *helper, GError **error)
{
+ gboolean ret;
g_return_val_if_fail (!error || !*error, FALSE);
+ ret = g_spawn_command_line_async ("xflock4", NULL);
+ if (!ret)
+ g_warning("Could not lock screen");
+
#ifdef ENABLE_UPOWER
if ( helper->sleep_backend == XFSM_SLEEP_BACKEND_UPOWER )
{