src/video/cocoa/SDL_cocoawindow.m
changeset 7566 b14d00c30095
parent 7535 c515121a3df7
child 7593 20298a0d8631
--- a/src/video/cocoa/SDL_cocoawindow.m	Fri Aug 02 18:25:20 2013 -0400
+++ b/src/video/cocoa/SDL_cocoawindow.m	Sat Aug 03 02:20:00 2013 -0400
@@ -239,6 +239,13 @@
        or resizing from a corner */
     SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MOVED, x, y);
     SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h);
+
+    const BOOL zoomed = [_data->nswindow isZoomed];
+    if (!zoomed) {
+        SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESTORED, 0, 0);
+    } else if (zoomed) {
+        SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MAXIMIZED, 0, 0);
+    }
 }
 
 - (void)windowDidMiniaturize:(NSNotification *)aNotification