Mercurial > sdl-ios-xcode
comparison src/video/gem/SDL_gemevents.c @ 1088:6091b9ca1a97
Don't generate multiple mouse focus events
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Thu, 07 Jul 2005 12:10:30 +0000 |
parents | 936da0056ed3 |
children | b3f7c4af00e0 |
comparison
equal
deleted
inserted
replaced
1087:8c44005e0979 | 1088:6091b9ca1a97 |
---|---|
177 } | 177 } |
178 | 178 |
179 /* Mouse entering/leaving window */ | 179 /* Mouse entering/leaving window */ |
180 if (resultat & MU_M1) { | 180 if (resultat & MU_M1) { |
181 if (this->input_grab == SDL_GRAB_OFF) { | 181 if (this->input_grab == SDL_GRAB_OFF) { |
182 SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); | 182 if ( !(SDL_GetAppState() & SDL_APPMOUSEFOCUS) ) { |
183 SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); | |
184 } | |
183 } | 185 } |
184 } | 186 } |
185 if (resultat & MU_M2) { | 187 if (resultat & MU_M2) { |
186 if (this->input_grab == SDL_GRAB_OFF) { | 188 if (this->input_grab == SDL_GRAB_OFF) { |
187 SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS); | 189 if ( (SDL_GetAppState() & SDL_APPMOUSEFOCUS) ) { |
190 SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS); | |
191 ] | |
188 } | 192 } |
189 } | 193 } |
190 | 194 |
191 /* Timer event ? */ | 195 /* Timer event ? */ |
192 if ((resultat & MU_TIMER) || quit) | 196 if ((resultat & MU_TIMER) || quit) |
258 case WM_ALLICONIFY: | 262 case WM_ALLICONIFY: |
259 wind_set(message[3],WF_ICONIFY,message[4],message[5],message[6],message[7]); | 263 wind_set(message[3],WF_ICONIFY,message[4],message[5],message[6],message[7]); |
260 /* If we're active, make ourselves inactive */ | 264 /* If we're active, make ourselves inactive */ |
261 if ( SDL_GetAppState() & SDL_APPACTIVE ) { | 265 if ( SDL_GetAppState() & SDL_APPACTIVE ) { |
262 /* Send an internal deactivate event */ | 266 /* Send an internal deactivate event */ |
263 SDL_PrivateAppActive(0, SDL_APPACTIVE|SDL_APPINPUTFOCUS); | 267 SDL_PrivateAppActive(0, SDL_APPACTIVE); |
264 } | 268 } |
265 /* Update window title */ | 269 /* Update window title */ |
266 if (GEM_refresh_name && GEM_icon_name) { | 270 if (GEM_refresh_name && GEM_icon_name) { |
267 wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_icon_name)>>16),(short)(((unsigned long)GEM_icon_name) & 0xffff),0,0); | 271 wind_set(GEM_handle,WF_NAME,(short)(((unsigned long)GEM_icon_name)>>16),(short)(((unsigned long)GEM_icon_name) & 0xffff),0,0); |
268 GEM_refresh_name = SDL_FALSE; | 272 GEM_refresh_name = SDL_FALSE; |