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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user