# HG changeset patch # User Patrice Mandin # Date 1117749648 0 # Node ID 5d9947da7510bf9136924fc2f61d0984902fce1c # Parent fba6b67b4d60d94a229027d9e17da7d03f50bb36 Enable/disable mouse focus diff -r fba6b67b4d60 -r 5d9947da7510 src/video/gem/SDL_gemevents.c --- a/src/video/gem/SDL_gemevents.c Tue May 31 12:31:11 2005 +0000 +++ b/src/video/gem/SDL_gemevents.c Thu Jun 02 22:00:48 2005 +0000 @@ -224,6 +224,9 @@ case WM_TOPPED: wind_set(message[3],WF_TOP,message[4],0,0,0); SDL_PrivateAppActive(1, SDL_APPINPUTFOCUS); + if (this->input_grab == SDL_GRAB_OFF) { + SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); + } break; case WM_REDRAW: if (!GEM_lock_redraw) { @@ -286,6 +289,9 @@ case WM_BOTTOMED: case WM_UNTOPPED: SDL_PrivateAppActive(0, SDL_APPINPUTFOCUS); + if (this->input_grab == SDL_GRAB_OFF) { + SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS); + } break; }