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.
This commit is contained in:
parent
497c73b972
commit
2f1ae3feba
2 changed files with 5 additions and 4 deletions
|
@ -54,7 +54,7 @@
|
||||||
#define BOOKMARK_FILE "bookmarks.xbel"
|
#define BOOKMARK_FILE "bookmarks.xbel"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef GDK_WINDOWING_X11
|
#ifdef HAVE_X11_EXTENSIONS_SCRNSAVER_H
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/extensions/scrnsaver.h>
|
#include <X11/extensions/scrnsaver.h>
|
||||||
|
@ -1438,7 +1438,7 @@ typedef struct {
|
||||||
static gboolean
|
static gboolean
|
||||||
midori_inactivity_timeout (gpointer data)
|
midori_inactivity_timeout (gpointer data)
|
||||||
{
|
{
|
||||||
#ifdef GDK_WINDOWING_X11
|
#ifdef HAVE_X11_EXTENSIONS_SCRNSAVER_H
|
||||||
MidoriInactivityTimeout* mit = data;
|
MidoriInactivityTimeout* mit = data;
|
||||||
static Display* xdisplay = NULL;
|
static Display* xdisplay = NULL;
|
||||||
static XScreenSaverInfo* mit_info = NULL;
|
static XScreenSaverInfo* mit_info = NULL;
|
||||||
|
@ -1532,7 +1532,7 @@ main (int argc,
|
||||||
N_("Display program version"), NULL },
|
N_("Display program version"), NULL },
|
||||||
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &uris,
|
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &uris,
|
||||||
N_("Addresses"), NULL },
|
N_("Addresses"), NULL },
|
||||||
#ifdef GDK_WINDOWING_X11
|
#ifdef HAVE_X11_EXTENSIONS_SCRNSAVER_H
|
||||||
{ "inactivity-reset", 'i', 0, G_OPTION_ARG_INT, &inactivity_reset,
|
{ "inactivity-reset", 'i', 0, G_OPTION_ARG_INT, &inactivity_reset,
|
||||||
N_("Reset Midori after SECONDS seconds of inactivity"), N_("SECONDS") },
|
N_("Reset Midori after SECONDS seconds of inactivity"), N_("SECONDS") },
|
||||||
#endif
|
#endif
|
||||||
|
|
3
wscript
3
wscript
|
@ -209,7 +209,8 @@ def configure (conf):
|
||||||
args = '--define-variable=target=win32'
|
args = '--define-variable=target=win32'
|
||||||
elif sys.platform != 'darwin':
|
elif sys.platform != 'darwin':
|
||||||
check_pkg ('x11')
|
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 ('gtk+-2.0', '2.10.0', var='GTK', args=args)
|
||||||
check_pkg ('webkit-1.0', '1.1.1', args=args)
|
check_pkg ('webkit-1.0', '1.1.1', args=args)
|
||||||
check_pkg ('libsoup-2.4', '2.25.2')
|
check_pkg ('libsoup-2.4', '2.25.2')
|
||||||
|
|
Loading…
Reference in a new issue