Mercurial > sdl-ios-xcode
comparison src/events/SDL_windowevents.c @ 1734:f7c667ded87d SDL-1.3
The general code handles restoring video mode/gamma/etc. when the window loses focus.
Support for changing fullscreen/windowed mode in progress.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 09 Jul 2006 18:09:16 +0000 |
parents | 0b1070f2f94d |
children |
comparison
equal
deleted
inserted
replaced
1733:0b1070f2f94d | 1734:f7c667ded87d |
---|---|
98 return 0; | 98 return 0; |
99 } | 99 } |
100 window->flags &= ~SDL_WINDOW_MOUSE_FOCUS; | 100 window->flags &= ~SDL_WINDOW_MOUSE_FOCUS; |
101 break; | 101 break; |
102 case SDL_WINDOWEVENT_FOCUS_GAINED: | 102 case SDL_WINDOWEVENT_FOCUS_GAINED: |
103 if (window->flags & SDL_WINDOW_KEYBOARD_FOCUS) { | 103 if (window->flags & SDL_WINDOW_INPUT_FOCUS) { |
104 return 0; | 104 return 0; |
105 } | 105 } |
106 window->flags |= SDL_WINDOW_KEYBOARD_FOCUS; | 106 window->flags |= SDL_WINDOW_INPUT_FOCUS; |
107 SDL_OnWindowFocusGained(window); | 107 SDL_OnWindowFocusGained(window); |
108 break; | 108 break; |
109 case SDL_WINDOWEVENT_FOCUS_LOST: | 109 case SDL_WINDOWEVENT_FOCUS_LOST: |
110 if (!(window->flags & SDL_WINDOW_KEYBOARD_FOCUS)) { | 110 if (!(window->flags & SDL_WINDOW_INPUT_FOCUS)) { |
111 return 0; | 111 return 0; |
112 } | 112 } |
113 window->flags &= ~SDL_WINDOW_KEYBOARD_FOCUS; | 113 window->flags &= ~SDL_WINDOW_INPUT_FOCUS; |
114 SDL_OnWindowFocusLost(window); | 114 SDL_OnWindowFocusLost(window); |
115 break; | 115 break; |
116 } | 116 } |
117 | 117 |
118 /* Post the event, if desired */ | 118 /* Post the event, if desired */ |