]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/nonownedwnd.mm
Since wxDialog::Show(false) only calls wxWindow::Show, we must explicitly hide the...
[wxWidgets.git] / src / osx / cocoa / nonownedwnd.mm
index 807fbdab4cafc3d6af80fc86227c6e1621cfab91..2cd07f9ef2f3beba4dd2ac96511a1ee6d60f1a03 100644 (file)
@@ -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 )