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;