X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..538a2cfaf2be9f864e58c9a9fe232966af6bf2a0:/src/common/dpycmn.cpp diff --git a/src/common/dpycmn.cpp b/src/common/dpycmn.cpp index aa4f5e0533..0087b7d09f 100644 --- a/src/common/dpycmn.cpp +++ b/src/common/dpycmn.cpp @@ -6,7 +6,7 @@ // Created: 01.03.03 // RCS-ID: $Id$ // Copyright: (c) 2003-2006 Vadim Zeitlin -// License: wxWindows licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -98,11 +98,7 @@ public: virtual bool OnInit() { return true; } virtual void OnExit() { - if ( gs_factory ) - { - delete gs_factory; - gs_factory = NULL; - } + wxDELETE(gs_factory); } DECLARE_DYNAMIC_CLASS(wxDisplayModule) @@ -238,7 +234,7 @@ bool wxDisplay::ChangeMode(const wxVideoMode& mode) 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)); }