X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/338dd992160bf20205743c092b353d96ef7604fb..6433f6d3165a3f8633f42c59694a9104a7b37a93:/src/motif/dcscreen.cpp?ds=sidebyside diff --git a/src/motif/dcscreen.cpp b/src/motif/dcscreen.cpp index 9686ee49b6..1da45d5e39 100644 --- a/src/motif/dcscreen.cpp +++ b/src/motif/dcscreen.cpp @@ -14,6 +14,7 @@ #endif #include "wx/window.h" +#include "wx/frame.h" #include "wx/dcscreen.h" #include "wx/utils.h" @@ -27,9 +28,7 @@ #include "wx/motif/private.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC) -#endif WXWindow wxScreenDC::sm_overlayWindow = 0; int wxScreenDC::sm_overlayWindowX = 0; @@ -66,6 +65,7 @@ wxScreenDC::wxScreenDC() wxScreenDC::~wxScreenDC() { + EndDrawingOnTop(); } bool wxScreenDC::StartDrawingOnTop(wxWindow* window) @@ -73,7 +73,7 @@ bool wxScreenDC::StartDrawingOnTop(wxWindow* window) wxRect rect; int x, y, width, height; window->GetPosition(& x, & y); - if (window->GetParent()) + if (window->GetParent() && !window->IsKindOf(CLASSINFO(wxFrame))) window->GetParent()->ClientToScreen(& x, & y); window->GetSize(& width, & height); rect.x = x; rect.y = y;