From dbbdd3465fe32716361ef3f2f3951fa94ea1a63e Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 7 Sep 2006 16:09:48 +0000 Subject: [PATCH] make sure wxWindow has valid (albeit bogus) size from the beginning git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/dfb/window.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dfb/window.cpp b/src/dfb/window.cpp index d79093378a..bd9f6cdce5 100644 --- a/src/dfb/window.cpp +++ b/src/dfb/window.cpp @@ -126,6 +126,10 @@ bool wxWindowDFB::Create(wxWindow *parent, if ( parent ) parent->AddChild(this); + // set the size to something bogus initially, in case some code tries to + // create wxWindowDC before SetSize() is called below: + m_rect.width = m_rect.height = 1; + int x, y, w, h; x = pos.x, y = pos.y; if ( x == -1 ) x = 0; -- 2.45.2