X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4c151c737e514a8b8ccdc6eebc9a6d421e8d59ec..052d2fc5818243dadbc1ec54b1120e295304fc55:/src/motif/dcscreen.cpp?ds=sidebyside diff --git a/src/motif/dcscreen.cpp b/src/motif/dcscreen.cpp index df547fe628..71f3c01e54 100644 --- a/src/motif/dcscreen.cpp +++ b/src/motif/dcscreen.cpp @@ -9,21 +9,29 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dcscreen.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/window.h" +#include "wx/frame.h" #include "wx/dcscreen.h" #include "wx/utils.h" +#ifdef __VMS__ +#pragma message disable nosimpint +#endif #include +#ifdef __VMS__ +#pragma message enable nosimpint +#endif -#include +#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; @@ -60,6 +68,7 @@ wxScreenDC::wxScreenDC() wxScreenDC::~wxScreenDC() { + EndDrawingOnTop(); } bool wxScreenDC::StartDrawingOnTop(wxWindow* window) @@ -67,7 +76,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;