X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d120f8391920145647ec10e84629bc21fa9f1bb..23176131010f41b2f9a54bef50c8afa25472e195:/src/motif/dcmemory.cpp diff --git a/src/motif/dcmemory.cpp b/src/motif/dcmemory.cpp index 85291b7c62..3dd666c700 100644 --- a/src/motif/dcmemory.cpp +++ b/src/motif/dcmemory.cpp @@ -9,14 +9,21 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dcmemory.h" #endif #include "wx/dcmemory.h" +#include "wx/settings.h" #include "wx/utils.h" +#ifdef __VMS__ +#pragma message disable nosimpint +#endif #include +#ifdef __VMS__ +#pragma message enable nosimpint +#endif #include "wx/motif/private.h" @@ -37,9 +44,10 @@ wxMemoryDC::wxMemoryDC(void) gcvalues.foreground = BlackPixel (display, DefaultScreen (display)); gcvalues.background = WhitePixel (display, DefaultScreen (display)); gcvalues.graphics_exposures = False; + gcvalues.subwindow_mode = IncludeInferiors; gcvalues.line_width = 1; m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)), - GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth, + GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode, &gcvalues); m_backgroundPixel = (int) gcvalues.background; @@ -50,6 +58,7 @@ wxMemoryDC::wxMemoryDC(void) m_oldFont = (WXFont) valReturn.font; SetBrush (* wxWHITE_BRUSH); SetPen (* wxBLACK_PEN); + SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); }; wxMemoryDC::wxMemoryDC( wxDC* dc ) @@ -66,9 +75,10 @@ wxMemoryDC::wxMemoryDC( wxDC* dc ) gcvalues.foreground = BlackPixel (display, DefaultScreen (display)); gcvalues.background = WhitePixel (display, DefaultScreen (display)); gcvalues.graphics_exposures = False; + gcvalues.subwindow_mode = IncludeInferiors; gcvalues.line_width = 1; m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)), - GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth, + GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode, &gcvalues); m_backgroundPixel = (int) gcvalues.background; @@ -95,19 +105,21 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) if (m_bitmap.Ok() && (bitmap.GetDisplay() == m_display)) { - m_pixmap = m_bitmap.GetPixmap(); + m_pixmap = m_bitmap.GetDrawable(); Display* display = (Display*) m_display; XGCValues gcvalues; gcvalues.foreground = BlackPixel (display, DefaultScreen (display)); gcvalues.background = WhitePixel (display, DefaultScreen (display)); gcvalues.graphics_exposures = False; + gcvalues.subwindow_mode = IncludeInferiors; gcvalues.line_width = 1; - m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)), - GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth, + m_gc = (WXGC) XCreateGC (display, (Drawable)m_pixmap/* RootWindow (display, DefaultScreen (display)) */, + GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode, &gcvalues); m_backgroundPixel = (int) gcvalues.background; + m_ok = TRUE; // Get the current Font so we can set it back later XGCValues valReturn; @@ -122,7 +134,6 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) SetOptimization(oldOpt); - m_ok = TRUE; } else { @@ -131,7 +142,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) }; }; -void wxMemoryDC::GetSize( int *width, int *height ) const +void wxMemoryDC::DoGetSize( int *width, int *height ) const { if (m_bitmap.Ok()) {