From: "Donald D. Dugger" Subject: [PATCH] Fix SDL mouse invisible wall Date: Wed, 14 Jun 2006 09:25:42 -0700 Message-ID: <20060614162542.GA14218@los-vmm.sc.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Thanks to Anthony Liquori off the QEMU mailing list for this SDL mouse fix. The new mouse code can hit situation where it won't move past `invisible wall` on the screen. This patch fixes that problem. Signed-off-by: Don Dugger -- Don Dugger "Censeo Toto nos in Kansa esse decisse." - D. Gale Donald.D.Dugger@intel.com Ph: (303)440-1368 diff -r 6bffed2aa78b tools/ioemu/sdl.c --- a/tools/ioemu/sdl.c Mon Jun 12 17:56:20 2006 +0100 +++ b/tools/ioemu/sdl.c Wed Jun 14 10:10:36 2006 -0600 @@ -376,13 +376,18 @@ static void sdl_update_caption(void) static void sdl_hide_cursor(void) { - SDL_SetCursor(sdl_cursor_hidden); + if (kbd_mouse_is_absolute()) { + SDL_ShowCursor(1); + SDL_SetCursor(sdl_cursor_hidden); + } else { + SDL_ShowCursor(0); + } } static void sdl_show_cursor(void) { if (!kbd_mouse_is_absolute()) { - SDL_SetCursor(sdl_cursor_normal); + SDL_ShowCursor(1); } }