From 275341c036b88827b79f86495b3ad3f9ee512b09 Mon Sep 17 00:00:00 2001 From: David Elliott Date: Fri, 22 Aug 2003 21:54:43 +0000 Subject: [PATCH] Show(): Send a wxWindows size event just before calling makeKeyAndOrderFront: git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/toplevel.mm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/cocoa/toplevel.mm b/src/cocoa/toplevel.mm index 3b5bf13131..02a017515b 100644 --- a/src/cocoa/toplevel.mm +++ b/src/cocoa/toplevel.mm @@ -177,7 +177,16 @@ bool wxTopLevelWindowCocoa::Show(bool show) { wxAutoNSAutoreleasePool pool; if(show) + { + // Send the window a size event because wxWindows apps expect it + // NOTE: This should really only be done the first time a window + // is shown. I doubt this will cause any problems though. + wxSizeEvent event(GetSize(), GetId()); + event.SetEventObject(this); + GetEventHandler()->ProcessEvent(event); + [m_cocoaNSWindow makeKeyAndOrderFront:m_cocoaNSWindow]; + } else [m_cocoaNSWindow orderOut:m_cocoaNSWindow]; return true; -- 2.45.2