diff options
author | Patrice Mandin <patmandin@gmail.com> | 2012-11-04 19:02:21 +0100 |
---|---|---|
committer | Patrice Mandin <patmandin@gmail.com> | 2012-11-04 19:02:21 +0100 |
commit | 1e5e68698fbdbd0e63213fb54d3741c6e536a35a (patch) | |
tree | 1a7aa9420be9866f553f2afd6619190944d0466d | |
parent | 430ebb20de8b78e75daf56815113a94133c5a6e8 (diff) | |
download | sdl-1e5e68698fbdbd0e63213fb54d3741c6e536a35a.tar.gz |
gem: Check mouse focus inside mouse motion function
-rw-r--r-- | src/video/gem/SDL_gemevents.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/video/gem/SDL_gemevents.c b/src/video/gem/SDL_gemevents.c index 5c551a3d5..6b9a373b7 100644 --- a/src/video/gem/SDL_gemevents.c +++ b/src/video/gem/SDL_gemevents.c @@ -117,16 +117,6 @@ void GEM_PumpEvents(_THIS) /* Mouse motion event ? */ if (resultat & MU_M1) { - if (this->input_grab == SDL_GRAB_OFF) { - /* Switch mouse focus state */ - if (!GEM_fullscreen && (GEM_handle>=0)) { - SDL_PrivateAppActive( - mouse_in_work_area(GEM_handle, mousex,mousey), - SDL_APPMOUSEFOCUS); - } - } - GEM_CheckMouseMode(this); - do_mouse_motion(this, mousex, mousey); prevmx = mousex; prevmy = mousey; @@ -304,6 +294,16 @@ static void do_mouse_motion(_THIS, short mx, short my) { short x2, y2, w2, h2; + if (this->input_grab == SDL_GRAB_OFF) { + /* Switch mouse focus state */ + if (!GEM_fullscreen && (GEM_handle>=0)) { + SDL_PrivateAppActive( + mouse_in_work_area(GEM_handle, mx,my), + SDL_APPMOUSEFOCUS); + } + } + GEM_CheckMouseMode(this); + /* Don't return mouse events if out of window */ if ((SDL_GetAppState() & SDL_APPMOUSEFOCUS)==0) { return; |