X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3cd0b8c5b5a320bba065c4da306be3687d144157..321fe98cfe4fe7572922ba35c334cdcfdf13b027:/src/x11/dcscreen.cpp diff --git a/src/x11/dcscreen.cpp b/src/x11/dcscreen.cpp index 0efabc519c..cd776d963d 100644 --- a/src/x11/dcscreen.cpp +++ b/src/x11/dcscreen.cpp @@ -9,14 +9,12 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "dcscreen.h" -#endif - #include "wx/window.h" #include "wx/frame.h" #include "wx/dcscreen.h" #include "wx/utils.h" +#include "wx/app.h" +#include "wx/fontutil.h" #include "wx/x11/private.h" @@ -47,6 +45,11 @@ wxScreenDC::wxScreenDC() m_isScreenDC = TRUE; +#if wxUSE_UNICODE + m_context = wxTheApp->GetPangoContext(); + m_fontdesc = wxNORMAL_FONT->GetNativeFontInfo()->description; +#endif + SetUpDC(); XSetSubwindowMode( (Display*) m_display, (GC) m_penGC, IncludeInferiors ); @@ -86,24 +89,23 @@ bool wxScreenDC::StartDrawingOnTop( wxWindow *window ) return StartDrawingOnTop( &rect ); } -bool wxScreenDC::StartDrawingOnTop( wxRect *rect ) +bool wxScreenDC::StartDrawingOnTop( wxRect *rectIn ) { - int x = 0; - int y = 0; + // VZ: should we do the same thing that wxMotif wxScreenDC does here? #if 0 - int width = gdk_screen_width(); - int height = gdk_screen_height(); -#else - int width = 1024; - int height = 768; -#endif - if (rect) + wxRect rect; + if ( rectIn ) { - x = rect->x; - y = rect->y; - width = rect->width; - height = rect->height; + rect = *rectIn; + } + else + { + rect.x = + rect.y = 0; + + DoGetSize(&rect.width, &rect.height); } +#endif // 0 return TRUE; }