aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2012-12-12 09:18:20 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2012-12-12 09:18:20 (GMT)
commit4191cbf2d2a71a5aeae41d54a5638abfc4789122 (patch)
treeea647d0fb35362b432653d0fc098ec8c22412dd4 /src/Screen.cc
parentd8cd6a928b76dbe63afa82327c51715cb1a1bdc8 (diff)
downloadfluxbox_pavel-4191cbf2d2a71a5aeae41d54a5638abfc4789122.zip
fluxbox_pavel-4191cbf2d2a71a5aeae41d54a5638abfc4789122.tar.bz2
Fix build regression: enable XRANDR support by default
The changes made in b178bed60b5bd8b2c9ed0cbc67fd729ff3820589 used the wrong variable to set the default state of '--enable-randr' in configure.in, that is fixed now. I also removed '--enable-randr12': If support for the Xrandr-extension is available at compile time we set HAVE_RANDR; if there is also support for Xrandr-1.2 (or higher), we also set HAVE_RANDR1_2 automatically. Other changes: * cleaned out public interface of 'class Fluxbox' * added 'RANDR' to output of 'fluxbox -info'
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 0d1923b..7992a19 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -132,7 +132,7 @@ extern "C" {
132} 132}
133#endif // XINERAMA 133#endif // XINERAMA
134 134
135#ifdef HAVE_RANDR 135#if defined(HAVE_RANDR) || defined(HAVE_RANDR1_2)
136#include <X11/extensions/Xrandr.h> 136#include <X11/extensions/Xrandr.h>
137#endif // HAVE_RANDR 137#endif // HAVE_RANDR
138 138
@@ -380,19 +380,26 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
380 XFree(ret_prop); 380 XFree(ret_prop);
381 } 381 }
382 382
383#ifdef HAVE_RANDR
384 // setup RANDR for this screens root window
385 // we need to determine if we should use old randr select input function or not
386#ifdef X_RRScreenChangeSelectInput
387 // use old set randr event
388 XRRScreenChangeSelectInput(disp, rootWindow().window(), True);
389#else
390 XRRSelectInput(disp, rootWindow().window(),
391 RRScreenChangeNotifyMask);
392#endif // X_RRScreenChangeSelectInput
393 383
384// setup RANDR for this screens root window
385#if defined(HAVE_RANDR1_2)
386 int randr_mask = RRScreenChangeNotifyMask;
387#ifdef RRCrtcChangeNotifyMask
388 randr_mask |= RRCrtcChangeNotifyMask;
389#endif
390#ifdef RROutputChangeNotifyMask
391 randr_mask |= RROutputChangeNotifyMask;
392#endif
393#ifdef RROutputPropertyNotifyMask
394 randr_mask |= RROutputPropertyNotifyMask;
395#endif
396 XRRSelectInput(disp, rootWindow().window(), randr_mask);
397
398#elif defined(HAVE_RANDR)
399 XRRScreenChangeSelectInput(disp, rootWindow().window(), True);
394#endif // HAVE_RANDR 400#endif // HAVE_RANDR
395 401
402
396 _FB_USES_NLS; 403 _FB_USES_NLS;
397 404
398#ifdef DEBUG 405#ifdef DEBUG