diff src/video/gem/SDL_gemevents.c @ 1065:5d9947da7510

Enable/disable mouse focus
author Patrice Mandin <patmandin@gmail.com>
date Thu, 02 Jun 2005 22:00:48 +0000
parents 54bb19455081
children f73b199bcd75
line wrap: on
line diff
--- 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;
 	}