From 27dc136121a6f97c5fbfeec6b642cf091324def4 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Wed, 3 Sep 2008 14:00:40 -0400 Subject: add check to configure script to detect old versions of Xrandr --- configure.in | 20 ++++++++++++++++++-- src/fluxbox.cc | 2 ++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 7fbe805..73662ae 100644 --- a/configure.in +++ b/configure.in @@ -494,6 +494,22 @@ AC_ARG_ENABLE( LIBS="$LIBS -lXrandr") ) +AC_MSG_CHECKING([whether to have RANDR 1.2 support]) +AC_ARG_ENABLE( + randr1.2, +[ --enable-randr1.2 RANDR 1.2 support ([default=yes])], + if test x$enableval = "xyes"; then + AC_MSG_RESULT([yes]) + AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration, + AC_DEFINE(HAVE_RANDR1_2, 1, "randr 1.2 support")) + else + AC_MSG_RESULT([no]) + fi, + AC_MSG_RESULT([yes]) + AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration, + AC_DEFINE(HAVE_RANDR1_2, 1, "randr 1.2 support")) +) + dnl Check for Xinerama support AC_MSG_CHECKING([whether to build support for the Xinerama extension]) @@ -549,7 +565,7 @@ AC_SUBST(DEFAULT_KEYS) AC_ARG_WITH( apps, - [ --with-apps=path location apps file (PREFIX/share/fluxbox/apps)], + [ --with-apps=path location apps file (PREFIX/share/fluxbox/apps)], DEFAULT_APPS=$with_apps, DEFAULT_APPS=\$\(prefix\)/share/fluxbox/apps ) @@ -557,7 +573,7 @@ AC_SUBST(DEFAULT_APPS) AC_ARG_WITH( overlay, - [ --with-overlay=path location overlay file (PREFIX/share/fluxbox/overlay)], + [ --with-overlay=path location overlay file (PREFIX/share/fluxbox/overlay)], DEFAULT_OVERLAY=$with_overlay, DEFAULT_OVERLAY=\$\(prefix\)/share/fluxbox/overlay ) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 27a0b68..3963d89 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -865,7 +865,9 @@ void Fluxbox::handleEvent(XEvent * const e) { #ifdef HAVE_RANDR if (e->type == m_randr_event_type) { +#ifdef HAVE_RANDR1_2 XRRUpdateConfiguration(e); +#endif // update root window size in screen BScreen *scr = searchScreen(e->xany.window); if (scr != 0) -- cgit v0.11.2