changeset 1065:5d9947da7510

Enable/disable mouse focus
author Patrice Mandin <patmandin@gmail.com>
date Thu, 02 Jun 2005 22:00:48 +0000
parents fba6b67b4d60
children 671bbd773c8a
files src/video/gem/SDL_gemevents.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
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;
 	}