diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-01-05 16:42:13 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-01-05 16:42:13 +0000 |
commit | 455204eb1a0880a5e4474acf07d4641f51123a1d (patch) | |
tree | bfd45c2e35a33fe1289de48263177e111ff4ee7d /sdl.c | |
parent | 6f30fa853b78203c3a03c91470b7d2d12f46955a (diff) |
Dynamic handling of guest mice, by Lonnie Mendez.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2290 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'sdl.c')
-rw-r--r-- | sdl.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -319,6 +319,7 @@ static void sdl_show_cursor(void) { if (!kbd_mouse_is_absolute()) { SDL_ShowCursor(1); + SDL_SetCursor(sdl_cursor_normal); } } @@ -364,6 +365,9 @@ static void sdl_send_mouse_event(int dz) SDL_GetMouseState(&dx, &dy); dx = dx * 0x7FFF / width; dy = dy * 0x7FFF / height; + } else if (absolute_enabled) { + sdl_show_cursor(); + absolute_enabled = 0; } kbd_mouse_event(dx, dy, dz, buttons); @@ -501,7 +505,8 @@ static void sdl_refresh(DisplayState *ds) } break; case SDL_MOUSEMOTION: - if (gui_grab || kbd_mouse_is_absolute()) { + if (gui_grab || kbd_mouse_is_absolute() || + absolute_enabled) { sdl_send_mouse_event(0); } break; |