[Xfce4-commits] <midori:master> Make use of the XScreenSaver extension optional

Christian Dywan noreply at xfce.org
Thu Apr 1 18:26:01 CEST 2010


Updating branch refs/heads/master
         to 2f1ae3febab7e25b2ecf020b248c26add6792cf6 (commit)
       from 497c73b972d7551bf959cb0a8cc481fdcc96b3d0 (commit)

commit 2f1ae3febab7e25b2ecf020b248c26add6792cf6
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Apr 1 18:22:56 2010 +0200

    Make use of the XScreenSaver extension optional
    
    The extension is only needed for the --inactivity-reset option,
    so most users building Midori won't need it.
    We also need to check for the according header file.

 midori/main.c |    6 +++---
 wscript       |    3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/midori/main.c b/midori/main.c
index d0e7e64..47a3ba3 100644
--- a/midori/main.c
+++ b/midori/main.c
@@ -54,7 +54,7 @@
     #define BOOKMARK_FILE "bookmarks.xbel"
 #endif
 
-#ifdef GDK_WINDOWING_X11
+#ifdef HAVE_X11_EXTENSIONS_SCRNSAVER_H
     #include <X11/Xlib.h>
     #include <X11/Xutil.h>
     #include <X11/extensions/scrnsaver.h>
@@ -1438,7 +1438,7 @@ typedef struct {
 static gboolean
 midori_inactivity_timeout (gpointer data)
 {
-    #ifdef GDK_WINDOWING_X11
+    #ifdef HAVE_X11_EXTENSIONS_SCRNSAVER_H
     MidoriInactivityTimeout* mit = data;
     static Display* xdisplay = NULL;
     static XScreenSaverInfo* mit_info = NULL;
@@ -1532,7 +1532,7 @@ main (int    argc,
        N_("Display program version"), NULL },
        { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &uris,
        N_("Addresses"), NULL },
-       #ifdef GDK_WINDOWING_X11
+       #ifdef HAVE_X11_EXTENSIONS_SCRNSAVER_H
        { "inactivity-reset", 'i', 0, G_OPTION_ARG_INT, &inactivity_reset,
        N_("Reset Midori after SECONDS seconds of inactivity"), N_("SECONDS") },
        #endif
diff --git a/wscript b/wscript
index e5d682a..a64c9bf 100644
--- a/wscript
+++ b/wscript
@@ -209,7 +209,8 @@ def configure (conf):
         args = '--define-variable=target=win32'
     elif sys.platform != 'darwin':
         check_pkg ('x11')
-        conf.check (lib='Xss', mandatory=True)
+        conf.check (header_name='X11/extensions/scrnsaver.h', mandatory=False)
+        conf.check (lib='Xss', mandatory=False)
     check_pkg ('gtk+-2.0', '2.10.0', var='GTK', args=args)
     check_pkg ('webkit-1.0', '1.1.1', args=args)
     check_pkg ('libsoup-2.4', '2.25.2')



More information about the Xfce4-commits mailing list