Commit 79cf651f authored by Patrice Mandin's avatar Patrice Mandin

Don't generate multiple mouse focus events

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401089
parent e8efe326
......@@ -179,12 +179,16 @@ void GEM_PumpEvents(_THIS)
/* Mouse entering/leaving window */
if (resultat & MU_M1) {
if (this->input_grab == SDL_GRAB_OFF) {
SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
if ( !(SDL_GetAppState() & SDL_APPMOUSEFOCUS) ) {
SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
}
}
}
if (resultat & MU_M2) {
if (this->input_grab == SDL_GRAB_OFF) {
SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS);
if ( (SDL_GetAppState() & SDL_APPMOUSEFOCUS) ) {
SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS);
]
}
}
......@@ -260,7 +264,7 @@ static int do_messages(_THIS, short *message)
/* If we're active, make ourselves inactive */
if ( SDL_GetAppState() & SDL_APPACTIVE ) {
/* Send an internal deactivate event */
SDL_PrivateAppActive(0, SDL_APPACTIVE|SDL_APPINPUTFOCUS);
SDL_PrivateAppActive(0, SDL_APPACTIVE);
}
/* Update window title */
if (GEM_refresh_name && GEM_icon_name) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment