From: Vadim Zeitlin Date: Thu, 16 Mar 2006 04:30:53 +0000 (+0000) Subject: compilation fixes after last checkin X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/547308b8e6592e62fdc35e906317eaeedf7ff65c?ds=inline compilation fixes after last checkin git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38130 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/unix/displayx11.cpp b/src/unix/displayx11.cpp index fdd1dc18b5..1ae9c9cce0 100644 --- a/src/unix/displayx11.cpp +++ b/src/unix/displayx11.cpp @@ -84,8 +84,9 @@ private: class WXDLLEXPORT wxDisplayImplX11 : public wxDisplayImpl { public: - wxDisplayImplX11(const XineramaScreenInfo& info) - : m_rect(info.x_org, info.y_org, info.width, info.height) + wxDisplayImplX11(size_t n, const XineramaScreenInfo& info) + : wxDisplayImpl(n), + m_rect(info.x_org, info.y_org, info.width, info.height) { } @@ -147,7 +148,7 @@ wxDisplayImpl *wxDisplayFactoryX11::CreateDisplay(size_t n) { ScreensInfo screens; - return n < screens.GetCount() ? new wxDisplayImplX11(screens[n]) : NULL; + return n < screens.GetCount() ? new wxDisplayImplX11(n, screens[n]) : NULL; } // ============================================================================ @@ -300,10 +301,12 @@ bool wxDisplay::ChangeMode(const wxVideoMode& mode) /* static */ wxDisplayFactory *wxDisplay::CreateFactory() { - Display *disp = (Display*)wxGetDisplay(); + if ( XineramaIsActive((Display*)wxGetDisplay()) ) + { + return new wxDisplayFactoryX11; + } - return XineramaIsActive(disp) ? new wxDisplayFactoryX11 - : new wxDisplayFactorySingle; + return new wxDisplayFactorySingle; } #endif /* wxUSE_DISPLAY */