#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;