From 68eb30a9f05541c3807f5c4f9dd06c8a3bc895a7 Mon Sep 17 00:00:00 2001 From: Scott Balneaves Date: Thu, 25 Apr 2013 11:31:12 -0500 Subject: 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 #include #include +#include #include #include +#include #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 */ -- cgit v1.2.1