summaryrefslogtreecommitdiff
path: root/src/gs-monitor.c
diff options
context:
space:
mode:
authorScott Balneaves <[email protected]>2013-04-25 11:31:12 -0500
committerScott Balneaves <[email protected]>2013-04-25 11:31:12 -0500
commit68eb30a9f05541c3807f5c4f9dd06c8a3bc895a7 (patch)
tree2af89b71c91ff20eb224047ab60ddd12fa6db9ea /src/gs-monitor.c
parenta72f0972e46ffc35781eafa547825dc07831e524 (diff)
downloadmate-screensaver-68eb30a9f05541c3807f5c4f9dd06c8a3bc895a7.tar.bz2
mate-screensaver-68eb30a9f05541c3807f5c4f9dd06c8a3bc895a7.tar.xz
Fix for issue #4
Diffstat (limited to 'src/gs-monitor.c')
-rw-r--r--src/gs-monitor.c8
1 files changed, 7 insertions, 1 deletions
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 */