#endif
#include "wx/window.h"
+#include "wx/frame.h"
#include "wx/dcscreen.h"
#include "wx/utils.h"
#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;
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;