// 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"
wxScreenDC::~wxScreenDC()
{
+ EndDrawingOnTop();
}
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;