* Don't confine mouse on grab
@ 2010-04-23 20:17 Harald Braumann
0 siblings, 0 replies; only message in thread
From: Harald Braumann @ 2010-04-23 20:17 UTC (permalink / raw)
To: kvm
Hi,
I'd like to propose a small change in the grab behaviour of the SDL
window:
Currently, when the mouse is moved over the window, the guest mouse is
moved as well and the guest receives keyboard input (using absolute
mouse here and focus-follow-mouse). However, the keyboard is not
grabbed, and so the guest doesn't receive all key combinations (very
bad, when you try to close a window in the guest and instead the whole
SDL window is closed). You have to click or use a key combination to
grab. Now, when the grab is active, also the pointer is confined
inside the SDL window. You have to again use a key combination to get
out.
The better behaviour, I think would be the following:
Whenever the SDL window gets the focus, it should grab the keyboard
without confining the pointer. Then you could use all the key
combinations in the guest and you could still change the focus by
moving the mouse out and to another window. VMware does it like this,
VirtualBox, I think, as well, and also the rdesktop client.
However, I've checked the SDL documentation and it seems it only
provides SDL_WM_GrabInput which grabs the keyboard *and* confines the
mouse. So maybe SDL would need to be extended for this to work. If
that is in fact the case, a work-around would be, to never do a
grab. My window manager can be configured to deliver (almost) all key
combinations to certain windows, so I could still get the desired
behaviour.
Cheers,
harry
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-23 20:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-23 20:17 Don't confine mouse on grab Harald Braumann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox