Commit da048947 authored by Sam Lantinga's avatar Sam Lantinga

Fixed bug #716

 Armin Burgmeier      2009-03-15 04:35:45 PDT

When I hold a mouse button down on another (non-SDL) window, then move the
mouse over an SDL window and releasing the mouse button there, then the
application does not receive an SDL_ACTIVEEVENT with state SDL_APPMOUSEFOCUS
and gain 1.

Furthermore, SDL_GetAppState() reports the application not having mouse focus
until moving the mouse out of the window and back in again.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%403926
parent 0bb1a612
...@@ -423,8 +423,6 @@ printf("Mode: NotifyGrab\n"); ...@@ -423,8 +423,6 @@ printf("Mode: NotifyGrab\n");
if ( xevent.xcrossing.mode == NotifyUngrab ) if ( xevent.xcrossing.mode == NotifyUngrab )
printf("Mode: NotifyUngrab\n"); printf("Mode: NotifyUngrab\n");
#endif #endif
if ( (xevent.xcrossing.mode != NotifyGrab) &&
(xevent.xcrossing.mode != NotifyUngrab) ) {
if ( this->input_grab == SDL_GRAB_OFF ) { if ( this->input_grab == SDL_GRAB_OFF ) {
posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
} }
...@@ -432,7 +430,6 @@ printf("Mode: NotifyUngrab\n"); ...@@ -432,7 +430,6 @@ printf("Mode: NotifyUngrab\n");
xevent.xcrossing.x, xevent.xcrossing.x,
xevent.xcrossing.y); xevent.xcrossing.y);
} }
}
break; break;
/* Losing mouse coverage? */ /* Losing mouse coverage? */
...@@ -444,9 +441,7 @@ printf("Mode: NotifyGrab\n"); ...@@ -444,9 +441,7 @@ printf("Mode: NotifyGrab\n");
if ( xevent.xcrossing.mode == NotifyUngrab ) if ( xevent.xcrossing.mode == NotifyUngrab )
printf("Mode: NotifyUngrab\n"); printf("Mode: NotifyUngrab\n");
#endif #endif
if ( (xevent.xcrossing.mode != NotifyGrab) && if ( xevent.xcrossing.detail != NotifyInferior ) {
(xevent.xcrossing.mode != NotifyUngrab) &&
(xevent.xcrossing.detail != NotifyInferior) ) {
if ( this->input_grab == SDL_GRAB_OFF ) { if ( this->input_grab == SDL_GRAB_OFF ) {
posted = SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS); posted = SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment