comparison src/video/SDL_video.c @ 3517:e7eec78e4b92

Fixed mouse events for fullscreen windows on Mac OS X
author Sam Lantinga <slouken@libsdl.org>
date Thu, 03 Dec 2009 08:33:39 +0000
parents 72e70a8c30d5
children e6f2f312780f
comparison
equal deleted inserted replaced
3516:72e70a8c30d5 3517:e7eec78e4b92
766 window = &display->windows[i]; 766 window = &display->windows[i];
767 if (FULLSCREEN_VISIBLE(window)) { 767 if (FULLSCREEN_VISIBLE(window)) {
768 SDL_DisplayMode fullscreen_mode; 768 SDL_DisplayMode fullscreen_mode;
769 if (SDL_GetWindowDisplayMode(window->id, &fullscreen_mode) == 0) { 769 if (SDL_GetWindowDisplayMode(window->id, &fullscreen_mode) == 0) {
770 SDL_SetDisplayModeForDisplay(display, &fullscreen_mode); 770 SDL_SetDisplayModeForDisplay(display, &fullscreen_mode);
771 display->fullscreen_window = window;
771 return; 772 return;
772 } 773 }
773 } 774 }
774 } 775 }
775 776
776 /* Nope, restore the desktop mode */ 777 /* Nope, restore the desktop mode */
777 SDL_SetDisplayModeForDisplay(display, NULL); 778 SDL_SetDisplayModeForDisplay(display, NULL);
779 display->fullscreen_window = NULL;
778 } 780 }
779 781
780 int 782 int
781 SDL_SetPaletteForDisplay(SDL_VideoDisplay * display, const SDL_Color * colors, int firstcolor, int ncolors) 783 SDL_SetPaletteForDisplay(SDL_VideoDisplay * display, const SDL_Color * colors, int firstcolor, int ncolors)
782 { 784 {