// Created: 01.03.03
// RCS-ID: $Id$
// Copyright: (c) 2003-2006 Vadim Zeitlin <vadim@wxwindows.org>
-// License: wxWindows licence
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
virtual bool OnInit() { return true; }
virtual void OnExit()
{
- if ( gs_factory )
- {
- delete gs_factory;
- gs_factory = NULL;
- }
+ wxDELETE(gs_factory);
}
DECLARE_DYNAMIC_CLASS(wxDisplayModule)
int wxDisplayFactory::GetFromWindow(const wxWindow *window)
{
// consider that the window belongs to the display containing its centre
- const wxRect r(window->GetRect());
+ const wxRect r(window->GetScreenRect());
return GetFromPoint(wxPoint(r.x + r.width/2, r.y + r.height/2));
}