aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
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