src/video/cocoa/SDL_cocoawindow.m
changeset 7566 b14d00c30095
parent 7535 c515121a3df7
child 7593 20298a0d8631
equal deleted inserted replaced
7565:3d97fc52d294 7566:b14d00c30095
   237 
   237 
   238     /* The window can move during a resize event, such as when maximizing
   238     /* The window can move during a resize event, such as when maximizing
   239        or resizing from a corner */
   239        or resizing from a corner */
   240     SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MOVED, x, y);
   240     SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MOVED, x, y);
   241     SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h);
   241     SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESIZED, w, h);
       
   242 
       
   243     const BOOL zoomed = [_data->nswindow isZoomed];
       
   244     if (!zoomed) {
       
   245         SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_RESTORED, 0, 0);
       
   246     } else if (zoomed) {
       
   247         SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MAXIMIZED, 0, 0);
       
   248     }
   242 }
   249 }
   243 
   250 
   244 - (void)windowDidMiniaturize:(NSNotification *)aNotification
   251 - (void)windowDidMiniaturize:(NSNotification *)aNotification
   245 {
   252 {
   246     SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
   253     SDL_SendWindowEvent(_data->window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);