X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89c7e9622933c3ee7906c39bc3927a7d5616b94b..b75867a61bad7efdce7ab11963a3672ce78a1e35:/src/motif/dcscreen.cpp?ds=sidebyside diff --git a/src/motif/dcscreen.cpp b/src/motif/dcscreen.cpp index 050acdcd5e..cdb5ed5dd4 100644 --- a/src/motif/dcscreen.cpp +++ b/src/motif/dcscreen.cpp @@ -47,9 +47,10 @@ wxScreenDC::wxScreenDC() 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 = XCreateGC (display, RootWindow (display, DefaultScreen (display)), - GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth, + GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode, &gcvalues); m_backgroundPixel = (int) gcvalues.background; @@ -65,7 +66,8 @@ bool wxScreenDC::StartDrawingOnTop(wxWindow* window) wxRect rect; int x, y, width, height; window->GetPosition(& x, & y); - window->ClientToScreen(& x, & y); + if (window->GetParent()) + window->GetParent()->ClientToScreen(& x, & y); window->GetSize(& width, & height); rect.x = x; rect.y = y; rect.width = width; rect.height = height; @@ -73,7 +75,7 @@ bool wxScreenDC::StartDrawingOnTop(wxWindow* window) return StartDrawingOnTop(& rect); } -bool wxScreenDC::StartDrawingOnTop(wxRect* rect = NULL) +bool wxScreenDC::StartDrawingOnTop(wxRect* rect) { if (sm_overlayWindow) return FALSE;