Don't confine mouse on grab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux