Enable/disable mouse focus
authorPatrice Mandin <patmandin@gmail.com>
Thu, 02 Jun 2005 22:00:48 +0000
changeset 1065 5d9947da7510
parent 1064 fba6b67b4d60
child 1066 671bbd773c8a
Enable/disable mouse focus
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;
 	}