]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/dcscreen.cpp
Changes for wxOGL since wxFatalError has been deprecated.
[wxWidgets.git] / src / motif / dcscreen.cpp
index 04c409033ff0b803b2ca07b9c1d73bf01ec30787..1da45d5e3935713455f9ae29d709db7bdba5f624 100644 (file)
 #pragma implementation "dcscreen.h"
 #endif
 
 #pragma implementation "dcscreen.h"
 #endif
 
+#include "wx/window.h"
+#include "wx/frame.h"
 #include "wx/dcscreen.h"
 #include "wx/utils.h"
 
 #include "wx/dcscreen.h"
 #include "wx/utils.h"
 
+#ifdef __VMS__
+#pragma message disable nosimpint
+#endif
 #include <Xm/Xm.h>
 #include <Xm/Xm.h>
+#ifdef __VMS__
+#pragma message enable nosimpint
+#endif
 
 
-#include <wx/motif/private.h>
+#include "wx/motif/private.h"
 
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
 IMPLEMENT_DYNAMIC_CLASS(wxScreenDC, wxWindowDC)
-#endif
 
 WXWindow wxScreenDC::sm_overlayWindow = 0;
 int wxScreenDC::sm_overlayWindowX = 0;
 
 WXWindow wxScreenDC::sm_overlayWindow = 0;
 int wxScreenDC::sm_overlayWindowX = 0;
@@ -59,6 +65,7 @@ wxScreenDC::wxScreenDC()
 
 wxScreenDC::~wxScreenDC()
 {
 
 wxScreenDC::~wxScreenDC()
 {
+    EndDrawingOnTop();
 }
 
 bool wxScreenDC::StartDrawingOnTop(wxWindow* window)
 }
 
 bool wxScreenDC::StartDrawingOnTop(wxWindow* window)
@@ -66,7 +73,7 @@ bool wxScreenDC::StartDrawingOnTop(wxWindow* window)
     wxRect rect;
     int x, y, width, height;
     window->GetPosition(& x, & y);
     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;
         window->GetParent()->ClientToScreen(& x, & y);
     window->GetSize(& width, & height);
     rect.x = x; rect.y = y;