]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/dcscreen.cpp
implemented Freeze/Thaw() (patch 922156)
[wxWidgets.git] / src / motif / dcscreen.cpp
index 1b0597df23a1a5608bcd467fe710ada2ba3cc1a0..62d1cbc8b828dd4a5ed8bf32e3542ed5efa40a5f 100644 (file)
@@ -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;