X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..e1983ab58804a0e32ab2d832ded0349af1cc0476:/src/motif/dcscreen.cpp diff --git a/src/motif/dcscreen.cpp b/src/motif/dcscreen.cpp index 1b0597df23..62d1cbc8b8 100644 --- a/src/motif/dcscreen.cpp +++ b/src/motif/dcscreen.cpp @@ -9,11 +9,12 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dcscreen.h" #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;