sdl: Dynamically grab input in absolute mouse mode
authorJan Kiszka <jan.kiszka@siemens.com>
Sat, 30 Jul 2011 09:39:15 +0000 (11:39 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 5 Aug 2011 15:57:35 +0000 (10:57 -0500)
commit441569b0fa6fef34defd83a8c13abaec106fa8c2
tree630ae2891b242ea478567466c6d86b9f5e733693
parentf846b9c02e373299409778302f602c37c0474425
sdl: Dynamically grab input in absolute mouse mode

Not grabbing the input means that special keys like ALT+TAB are still
handled by the host. Improve the usability by grabbing input once the
mouse is inside the guest screen, provided the SDL window has the input
focus. Release it again when the mouse is moved to any border. Also grab
the input when we gain the input focus and the mouse is within the
screen limits.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/sdl.c