From: Mikko Rasa Date: Tue, 8 Apr 2014 16:03:32 +0000 (+0300) Subject: Fix build with XRandR headers not installed X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=2f94297c901bf7161632fe88f23dcf987fa625f6;p=libs%2Fgui.git Fix build with XRandR headers not installed --- diff --git a/source/graphics/x11/display.cpp b/source/graphics/x11/display.cpp index c2a4eaf..7b8f9da 100644 --- a/source/graphics/x11/display.cpp +++ b/source/graphics/x11/display.cpp @@ -38,6 +38,7 @@ int x_error_handler(Display *display, XErrorEvent *event) return 0; } +#ifdef WITH_XRANDR inline Msp::Graphics::VideoRotation rotation_from_sys(Rotation r) { switch(r) @@ -59,6 +60,7 @@ inline Rotation rotation_to_sys(Msp::Graphics::VideoRotation r) default: return RR_Rotate_0; } } +#endif bool monitor_x_compare(const Msp::Graphics::Monitor &m1, const Msp::Graphics::Monitor &m2) { diff --git a/source/graphics/x11/display_platform.h b/source/graphics/x11/display_platform.h index 8db3e98..3a213c0 100644 --- a/source/graphics/x11/display_platform.h +++ b/source/graphics/x11/display_platform.h @@ -2,14 +2,21 @@ #define MSP_GRAPHICS_DISPLAY_PLATFORM_H_ #include +#ifdef WITH_XRANDR #include +#endif namespace Msp { namespace Graphics { typedef ::Display *DisplayHandle; +#ifdef WITH_XRANDR typedef RROutput MonitorHandle; typedef RRMode ModeHandle; +#else +typedef int MonitorHandle; +typedef int ModeHandle; +#endif } // namespace Graphics } // namespace Msp