diff options
author | Matthieu Herrb <matthieu@herrb.eu> | 2016-09-04 19:58:59 +0100 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2016-09-04 19:58:59 +0100 |
commit | 6e5b4f4930b51d15ffd62afc285c0f08900654ee (patch) | |
tree | a0068bad37b9f6bdf096b8916105c9ef07191a2c | |
parent | df25a1c5a2f433198915a4350eb3223665d53b21 (diff) |
Unifdef Xinerama support
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | greeter/Login.c | 14 |
2 files changed, 9 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac index 8eac455..d96550a 100644 --- a/configure.ac +++ b/configure.ac @@ -209,15 +209,12 @@ AC_SUBST(SHELL_CMD) PKG_CHECK_MODULES(XENODM, xmu x11 xau) -PKG_CHECK_EXISTS(xinerama, [ - AC_DEFINE([USE_XINERAMA], 1, - [Define to 1 to use XINERAMA in greeter & chooser]) - PKG_CHECK_MODULES(XINERAMA, xinerama) - CHOOSER_CFLAGS="$CHOOSER_CFLAGS $XINERAMA_CFLAGS" - CHOOSER_LIBS="$CHOOSER_LIBS $XINERAMA_LIBS" - GREETER_CFLAGS="$GREETER_CFLAGS $XINERAMA_CFLAGS" - GREETER_LIBS="$GREETER_LIBS $XINERAMA_LIBS" -]) +# Xinerama support +PKG_CHECK_MODULES(XINERAMA, xinerama) +CHOOSER_CFLAGS="$CHOOSER_CFLAGS $XINERAMA_CFLAGS" +CHOOSER_LIBS="$CHOOSER_LIBS $XINERAMA_LIBS" +GREETER_CFLAGS="$GREETER_CFLAGS $XINERAMA_CFLAGS" +GREETER_LIBS="$GREETER_LIBS $XINERAMA_LIBS" # Xft text drawing for the greeter screen PKG_CHECK_MODULES(XFT, xft xrender) diff --git a/greeter/Login.c b/greeter/Login.c index 468c0e3..696a8f6 100644 --- a/greeter/Login.c +++ b/greeter/Login.c @@ -80,9 +80,7 @@ from The Open Group. #include <X11/cursorfont.h> -#ifdef USE_XINERAMA -# include <X11/extensions/Xinerama.h> -#endif +#include <X11/extensions/Xinerama.h> #include <X11/extensions/Xrender.h> @@ -1597,10 +1595,8 @@ static void Initialize ( XGCValues myXGCV; Arg position[2]; Position x, y; -#ifdef USE_XINERAMA XineramaScreenInfo *screens; int s_num; -#endif int rv = 0; myXGCV.foreground = w->login.hipixel; @@ -1717,11 +1713,8 @@ SkipXpmLoad: (w->login.logoHeight + (2*w->login.logoPadding)) + pady); } -#ifdef USE_XINERAMA - if ( - XineramaIsActive(XtDisplay(w)) && - (screens = XineramaQueryScreens(XtDisplay(w), &s_num)) != NULL - ) + if (XineramaIsActive(XtDisplay(w)) && + (screens = XineramaQueryScreens(XtDisplay(w), &s_num)) != NULL) { if ((x = w->core.x) == -1) x = screens[0].x_org + (int)(screens[0].width - w->core.width) / 2; @@ -1731,7 +1724,6 @@ SkipXpmLoad: XFree(screens); } else -#endif { if ((x = w->core.x) == -1) x = (int)(XWidthOfScreen (XtScreen (w)) - w->core.width) / 2; |