src/video/x11/SDL_x11events.c
branchSDL-1.2
changeset 4255 5a203e2b0162
parent 4159 a1b03ba2fcd0
child 4264 d6f4cc9a5bf6
equal deleted inserted replaced
4254:8afecb86be35 4255:5a203e2b0162
   421 if ( xevent.xcrossing.mode == NotifyGrab )
   421 if ( xevent.xcrossing.mode == NotifyGrab )
   422 printf("Mode: NotifyGrab\n");
   422 printf("Mode: NotifyGrab\n");
   423 if ( xevent.xcrossing.mode == NotifyUngrab )
   423 if ( xevent.xcrossing.mode == NotifyUngrab )
   424 printf("Mode: NotifyUngrab\n");
   424 printf("Mode: NotifyUngrab\n");
   425 #endif
   425 #endif
   426 		if ( (xevent.xcrossing.mode != NotifyGrab) &&
   426 		if ( this->input_grab == SDL_GRAB_OFF ) {
   427 		     (xevent.xcrossing.mode != NotifyUngrab) ) {
   427 			posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
   428 			if ( this->input_grab == SDL_GRAB_OFF ) {
   428 		}
   429 				posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
   429 		posted = SDL_PrivateMouseMotion(0, 0,
   430 			}
   430 				xevent.xcrossing.x,
   431 			posted = SDL_PrivateMouseMotion(0, 0,
   431 				xevent.xcrossing.y);
   432 					xevent.xcrossing.x,
       
   433 					xevent.xcrossing.y);
       
   434 		}
       
   435 	    }
   432 	    }
   436 	    break;
   433 	    break;
   437 
   434 
   438 	    /* Losing mouse coverage? */
   435 	    /* Losing mouse coverage? */
   439 	    case LeaveNotify: {
   436 	    case LeaveNotify: {
   442 if ( xevent.xcrossing.mode == NotifyGrab )
   439 if ( xevent.xcrossing.mode == NotifyGrab )
   443 printf("Mode: NotifyGrab\n");
   440 printf("Mode: NotifyGrab\n");
   444 if ( xevent.xcrossing.mode == NotifyUngrab )
   441 if ( xevent.xcrossing.mode == NotifyUngrab )
   445 printf("Mode: NotifyUngrab\n");
   442 printf("Mode: NotifyUngrab\n");
   446 #endif
   443 #endif
   447 		if ( (xevent.xcrossing.mode != NotifyGrab) &&
   444 		if ( xevent.xcrossing.detail != NotifyInferior ) {
   448 		     (xevent.xcrossing.mode != NotifyUngrab) &&
       
   449 		     (xevent.xcrossing.detail != NotifyInferior) ) {
       
   450 			if ( this->input_grab == SDL_GRAB_OFF ) {
   445 			if ( this->input_grab == SDL_GRAB_OFF ) {
   451 				posted = SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS);
   446 				posted = SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS);
   452 			} else {
   447 			} else {
   453 				posted = SDL_PrivateMouseMotion(0, 0,
   448 				posted = SDL_PrivateMouseMotion(0, 0,
   454 						xevent.xcrossing.x,
   449 						xevent.xcrossing.x,