Commit 08a2d4c4ffde60e48819449f461274c43ad6e2d3

Authored by balrog
1 parent 8bf66d40

Allow usb tablet to be used with vmware-vga hwcursor.

Assume that in absolute mode the guest cursor always follows host cursor
and there's no need to move host cursor.  This avoids a strange feedback
loop.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6477 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 4 additions and 2 deletions
@@ -278,7 +278,8 @@ static void sdl_grab_start(void) @@ -278,7 +278,8 @@ static void sdl_grab_start(void)
278 { 278 {
279 if (guest_cursor) { 279 if (guest_cursor) {
280 SDL_SetCursor(guest_sprite); 280 SDL_SetCursor(guest_sprite);
281 - SDL_WarpMouse(guest_x, guest_y); 281 + if (!kbd_mouse_is_absolute() && !absolute_enabled)
  282 + SDL_WarpMouse(guest_x, guest_y);
282 } else 283 } else
283 sdl_hide_cursor(); 284 sdl_hide_cursor();
284 285
@@ -549,7 +550,8 @@ static void sdl_mouse_warp(int x, int y, int on) @@ -549,7 +550,8 @@ static void sdl_mouse_warp(int x, int y, int on)
549 sdl_show_cursor(); 550 sdl_show_cursor();
550 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) { 551 if (gui_grab || kbd_mouse_is_absolute() || absolute_enabled) {
551 SDL_SetCursor(guest_sprite); 552 SDL_SetCursor(guest_sprite);
552 - SDL_WarpMouse(x, y); 553 + if (!kbd_mouse_is_absolute() && !absolute_enabled)
  554 + SDL_WarpMouse(x, y);
553 } 555 }
554 } else if (gui_grab) 556 } else if (gui_grab)
555 sdl_hide_cursor(); 557 sdl_hide_cursor();