Hello community, here is the log from the commit of package xfce4-session for openSUSE:Factory checked in at 2011-12-21 10:04:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xfce4-session (Old) and /work/SRC/openSUSE:Factory/.xfce4-session.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xfce4-session", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/xfce4-session/xfce4-session.changes 2011-12-15 16:08:10.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.xfce4-session.new/xfce4-session.changes 2011-12-21 10:04:30.000000000 +0100 @@ -1,0 +2,7 @@ +Thu Dec 15 15:58:02 UTC 2011 - [email protected] + +- improve xfce4-session-lock-screen-on-suspend-hibernate.patch and + only lock the screen if xfce4-power-manager is configured to do + so and execute xflock4 synchronously + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xfce4-session.spec ++++++ --- /var/tmp/diff_new_pack.ss8YWt/_old 2011-12-21 10:04:31.000000000 +0100 +++ /var/tmp/diff_new_pack.ss8YWt/_new 2011-12-21 10:04:31.000000000 +0100 @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: xfce4-session Version: 4.8.2 Release: 0 ++++++ xfce4-session-lock-screen-on-suspend-hibernate.patch ++++++ --- /var/tmp/diff_new_pack.ss8YWt/_old 2011-12-21 10:04:31.000000000 +0100 +++ /var/tmp/diff_new_pack.ss8YWt/_new 2011-12-21 10:04:31.000000000 +0100 @@ -2,30 +2,54 @@ =================================================================== --- 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) - { +@@ -71,6 +71,8 @@ + + #include <libxfce4util/libxfce4util.h> + ++#include <xfconf/xfconf.h> ++ + #include "xfsm-shutdown-helper.h" + #include "xfsm-global.h" + +@@ -1722,6 +1724,24 @@ gboolean xfsm_shutdown_helper_send_passw + return TRUE; + } + ++static void ++lock_screen (void) ++{ ++ XfconfChannel *channel; + gboolean ret; ++ gint exit_status; ++ ++ channel = xfconf_channel_get ("xfce4-power-manager"); ++ if (xfconf_channel_get_bool (channel, "/xfce4-power-manager/lock-screen-suspend-hibernate", TRUE)) ++ { ++ ret = g_spawn_command_line_sync ("xflock4", NULL, NULL, &exit_status, NULL); ++ if (!ret || exit_status != 0) ++ { ++ g_warning ("Could not lock screen"); ++ } ++ } ++} ++ + /** + * xfsm_shutdown_helper_shutdown: + * +@@ -1785,6 +1805,8 @@ gboolean xfsm_shutdown_helper_suspend (X + { g_return_val_if_fail (!error || !*error, FALSE); -+ ret = g_spawn_command_line_async ("xflock4", NULL); -+ if (!ret) -+ g_warning("Could not lock screen"); ++ 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) +@@ -1812,6 +1834,8 @@ gboolean xfsm_shutdown_helper_hibernate { -+ 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"); ++ lock_screen (); + #ifdef ENABLE_UPOWER if ( helper->sleep_backend == XFSM_SLEEP_BACKEND_UPOWER ) -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
