[Spice-devel] [PATCH] Alt-tab issue possible solution

Snir Sheriber ssheribe at redhat.com
Thu Jun 1 15:44:17 UTC 2017


Summary of the alt-tab issue: quite a while ago there was a bug named
"Fullscreen multi monitor setup: Alt-Tab processed by client"
(RHBZ#1275231) which was fixed and pushed (basically the solution
is letting grab also if focus is on the other display - no click is needed)
This solution has 2 problems:

1. This solution is causing another issue (there is no bug for that
but it was discussed before)- sometimes alt-tabbing\ctrl+alt+up on the
client may accidentally get inside the guest if the mouse is just above
the guest (focus is taken automatically if no other apps) window during
this window changing (alt-tabbing or ctrl+alt+up).

2. Apparently this solution doesn't work on windows client and now
alt-tab doesn't go to the guest even when clicking in the second
display (more info on [2-more-info]). and a bug for that opened at
RHBZ#1429611 


At first i thought to check if GRAB_WITH_FOCUS is set to avoid grab without
focus (solves #1 -nobug) but i dropped it for now in favor of only this patch
solving #2 that has a bug.

Any other suggestions \ ideas \ comments are welcome.


Snir.

[2-more-info] The issues is that on windows gtk will generate grab broken
if wm_killfocus received (when focus is changed) while the application
has the grab. which it means that if we have the grab on hover without
getting the focus first (i.e by clicking) it will cause grab_broken which
follows by no grab at all, gtk does this on purpose, i'm not sure why it
is good for.

Snir Sheriber (1):
  Grab keyboard based on focus in windows client

 src/spice-widget.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

-- 
2.9.3



More information about the Spice-devel mailing list