Navigation Menu

Skip to content

Commit

Permalink
Fixed bug #716
Browse files Browse the repository at this point in the history
 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.
  • Loading branch information
slouken committed Sep 27, 2009
1 parent fa9f128 commit 65a6498
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/video/x11/SDL_x11events.c
Expand Up @@ -423,15 +423,12 @@ printf("Mode: NotifyGrab\n");
if ( xevent.xcrossing.mode == NotifyUngrab )
printf("Mode: NotifyUngrab\n");
#endif
if ( (xevent.xcrossing.mode != NotifyGrab) &&
(xevent.xcrossing.mode != NotifyUngrab) ) {
if ( this->input_grab == SDL_GRAB_OFF ) {
posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
}
posted = SDL_PrivateMouseMotion(0, 0,
xevent.xcrossing.x,
xevent.xcrossing.y);
if ( this->input_grab == SDL_GRAB_OFF ) {
posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
}
posted = SDL_PrivateMouseMotion(0, 0,
xevent.xcrossing.x,
xevent.xcrossing.y);
}
break;

Expand All @@ -444,9 +441,7 @@ printf("Mode: NotifyGrab\n");
if ( xevent.xcrossing.mode == NotifyUngrab )
printf("Mode: NotifyUngrab\n");
#endif
if ( (xevent.xcrossing.mode != NotifyGrab) &&
(xevent.xcrossing.mode != NotifyUngrab) &&
(xevent.xcrossing.detail != NotifyInferior) ) {
if ( xevent.xcrossing.detail != NotifyInferior ) {
if ( this->input_grab == SDL_GRAB_OFF ) {
posted = SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS);
} else {
Expand Down

0 comments on commit 65a6498

Please sign in to comment.