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)
commit35b0f237205dc6a5c9aa3eae14f19ef4d37dafcd
tree630ae2891b242ea478567466c6d86b9f5e733693
parent74d9dc69abebdbf22b9473708aefd47ab53475dd
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