X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..6d9022fe3bb50a75b9b5eaf5cf32558e518ba310:/src/motif/dcscreen.cpp?ds=sidebyside diff --git a/src/motif/dcscreen.cpp b/src/motif/dcscreen.cpp index 1b0597df23..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" @@ -64,6 +65,7 @@ wxScreenDC::wxScreenDC() wxScreenDC::~wxScreenDC() { + EndDrawingOnTop(); } bool wxScreenDC::StartDrawingOnTop(wxWindow* window) @@ -71,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;