X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32b8e70161195819bd6b952892f74d9967028a6f..779a4d41ef6d606d39b03b4a7fa5fe27565bb66c:/src/osx/cocoa/nonownedwnd.mm diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index ddca7b49a3..2cd07f9ef2 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -204,6 +204,7 @@ typedef void (*wxOSX_NoResponderHandlerPtr)(NSView* self, SEL _cmd, SEL selector - (void)windowDidBecomeKey:(NSNotification *)notification; - (void)windowDidMove:(NSNotification *)notification; - (BOOL)windowShouldClose:(id)window; +- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame; @end @@ -327,6 +328,19 @@ typedef void (*wxOSX_NoResponderHandlerPtr)(NSView* self, SEL _cmd, SEL selector return nil; } +- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame +{ + wxNonOwnedWindowCocoaImpl* windowimpl = [(wxNSWindow*)window implementation]; + if ( windowimpl ) + { + wxNonOwnedWindow* wxpeer = windowimpl->GetWXPeer(); + wxMaximizeEvent event(wxpeer->GetId()); + event.SetEventObject(wxpeer); + return !wxpeer->HandleWindowEvent(event); + } + return true; +} + @end IMPLEMENT_DYNAMIC_CLASS( wxNonOwnedWindowCocoaImpl , wxNonOwnedWindowImpl ) @@ -694,7 +708,7 @@ bool wxNonOwnedWindowCocoaImpl::ShowFullScreen(bool show, long WXUNUSED(style)) void wxNonOwnedWindowCocoaImpl::RequestUserAttention(int flagsWX) { - int flagsOSX; + NSRequestUserAttentionType flagsOSX; switch ( flagsWX ) { case wxUSER_ATTENTION_INFO: