diff src/video/gem/SDL_gemevents.c @ 1857:417f2af2bd52

Fix mouse cursor change
author Patrice Mandin <patmandin@gmail.com>
date Wed, 14 Jun 2006 18:57:58 +0000
parents 2405517b5eab
children c121d94672cb f1816773a309
line wrap: on
line diff
--- a/src/video/gem/SDL_gemevents.c	Tue May 23 15:07:56 2006 +0000
+++ b/src/video/gem/SDL_gemevents.c	Wed Jun 14 18:57:58 2006 +0000
@@ -186,8 +186,18 @@
 			if (this->input_grab == SDL_GRAB_OFF) {
 				if (SDL_GetAppState() & SDL_APPMOUSEFOCUS) {
 					SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS);
+					if (SDL_GetAppState() & SDL_APPINPUTFOCUS) {
+						graf_mouse(ARROW, NULL);
+					}
 				} else {
 					SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
+					if (SDL_GetAppState() & SDL_APPINPUTFOCUS) {
+						if (GEM_cursor == (void *) -1) {
+							graf_mouse(M_OFF, NULL);
+						} else if (GEM_cursor) {
+							graf_mouse(USER_DEF, GEM_cursor->mform_p);
+						}
+					}
 				}
 			}
 		}