set teh xinerama stuff even when not compiled with the xinerama extension so code can use it always
Dana Jansens danakj@orodu.net
2 files changed,
6 insertions(+),
6 deletions(-)
M
otk/screeninfo.cc
→
otk/screeninfo.cc
@@ -80,7 +80,7 @@ default_string.resize(pos);
_display_string = string("DISPLAY=") + default_string + '.' + itostring(static_cast<unsigned long>(_screen)); - + #if 0 //def XINERAMA _xinerama_active = False;@@ -112,12 +112,16 @@ XFree(info);
// if we can't find any xinerama regions, then we act as if it is not // active, even though it said it was - _xinerama_active = True; + _xinerama_active = true; } } } } +#else + _xinerama_active = false; #endif // XINERAMA + if (!_xinerama_active) + _xinerama_areas.push_back(Rect(Point(0, 0), _size)); } }
M
otk/screeninfo.hh
→
otk/screeninfo.hh
@@ -24,10 +24,8 @@ int _depth;
int _screen; std::string _display_string; Size _size; -#ifdef XINERAMA std::vector<Rect> _xinerama_areas; bool _xinerama_active; -#endif public: ScreenInfo(int num);@@ -39,11 +37,9 @@ inline int depth() const { return _depth; }
inline int screen() const { return _screen; } inline const Size& size() const { return _size; } inline const std::string& displayString() const { return _display_string; } -#ifdef XINERAMA inline const std::vector<Rect> &xineramaAreas() const { return _xinerama_areas; } inline bool isXineramaActive() const { return _xinerama_active; } -#endif }; }