[Xfce4-commits] [apps/xfce4-screensaver] 77/425: Fix for issue #4

noreply at xfce.org noreply at xfce.org
Mon Oct 15 01:48:44 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit 68eb30a9f05541c3807f5c4f9dd06c8a3bc895a7
Author: Scott Balneaves <sbalneav at mate-desktop.org>
Date:   Thu Apr 25 11:31:12 2013 -0500

    Fix for issue #4
---
 configure.ac       | 2 +-
 savers/Makefile.am | 1 +
 src/gs-monitor.c   | 8 +++++++-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index a830cc1..e7a6625 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,7 +109,7 @@ esac
 
 # Optional dependencies for the theme engines
 
-SAVER_MODULES="gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED_VERSION"
+SAVER_MODULES="gthread-2.0 gtk+-2.0 >= $GTK_REQUIRED_VERSION gobject-2.0 >= $GLIB_REQUIRED_VERSION"
 
 PKG_CHECK_MODULES(MATE_SCREENSAVER_SAVER, $SAVER_MODULES)
 AC_SUBST(MATE_SCREENSAVER_SAVER_CFLAGS)
diff --git a/savers/Makefile.am b/savers/Makefile.am
index ca80757..fb26df8 100644
--- a/savers/Makefile.am
+++ b/savers/Makefile.am
@@ -62,6 +62,7 @@ noinst_LIBRARIES =			\
 	libgs-theme-engine.a
 
 libgs_theme_engine_a_CPPFLAGS =					\
+	$(MATE_SCREENSAVER_SAVER_CFLAGS)			\
 	-DDATADIR=\""$(datadir)"\"				\
 	$(NULL)
 
diff --git a/src/gs-monitor.c b/src/gs-monitor.c
index 67cf4bb..56ef901 100644
--- a/src/gs-monitor.c
+++ b/src/gs-monitor.c
@@ -25,9 +25,11 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
+#include <X11/extensions/scrnsaver.h>
 
 #include <glib.h>
 #include <glib-object.h>
+#include <gdk/gdkx.h>
 
 #include "mate-screensaver.h"
 
@@ -189,7 +191,11 @@ static void gs_monitor_lock_screen(GSMonitor* monitor)
 
 static void gs_monitor_simulate_user_activity(GSMonitor* monitor)
 {
-	/* FIXME: reset the xsync timer? */
+	Display *display = gdk_x11_display_get_xdisplay (gdk_display_get_default ());
+	XScreenSaverSuspend (display, TRUE);
+	XSync (display, FALSE);
+	XScreenSaverSuspend (display, FALSE);
+	XSync (display, FALSE);
 
 	/* request that the manager unlock -
 	   will pop up a dialog if necessary */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list