key event going to display even with keyboard ungrabbed
@zeenix
Submitted by Zeeshan Ali Assigned to Spice Bug List
Description
Too lazy to re-write description again so I'll just copy&paste discussion from #spice IRC channel:
<zeenix>
shouldn't spice-display not handle any kbd events when kbd is ungrabbed?
<zeenix>
In Boxes, user would expect the kbd shortcuts to topbar buttons to work when they ungrab kbd but seems all events (but system ones, e.g super key) still goes to display
<fidencio>
zeenix: sounds like a bug. is it some regression?
<zeenix>
fidencio: well, not sure
<zeenix>
fidencio: could you try reproducing?
<fidencio>
zeenix: on boxes? I have no VM installed using boxes.
<fidencio>
zeenix: can you try to reproduce? :-) bisecting is also welcome.
<zeenix>
fidencio: i can already reproduce
<zeenix>
fidencio: you know installing a VM should be pretty easy in Boxes :)
<zeenix>
fidencio: i would bissect if i knew this ever worked
<fidencio>
zeenix: the only image that is handy is the win8.1 one
<zeenix>
fidencio: Boxes now does URL completion so its super easy to install a Fedora VM :)
<zeenix>
now -> since an year at least
<fidencio>
zeenix: which version of spice-gtk are you using?
<zeenix>
0.29.21-f808
<fidencio>
zeenix: on 0.28 we have a commit that looks suspicious ... 64084f37
<zeenix>
fidencio: can you try reproducing in any spice client?
<fidencio>
zeenix: I am going for it, just in the middle of something else right now ...
<fidencio>
zeenix: gimme a few minutes
<zeenix>
sure, no big hurry
<fidencio>
zeenix: I cannot reproduce the issue on f23
<fidencio>
zeenix: spice-gtk-0.30-1.fc23
<zeenix>
fidencio: how did you try?
<zeenix>
fidencio: and which client?
<zeenix>
i reproduced on Boxes against spice-gtk-0.30-1.fc23 as well
<fidencio>
zeenix: Boxes
<zeenix>
i mean, what steps
<zeenix>
exactly
<zeenix>
the only kbd shortcut to try in there would be alt+left (to go back to overview)
<zeenix>
fidencio: perhaps you tried a system kbd shortcut? That works (as I already said above)
<fidencio>
I see some logic inverted here, zeenix. You're the one who must provide me some steps to reproduce. Anyways, I tested with: ctrl+alt when the keyboard is grabbed. it works. I also tested moving the mouse pointer to the topbar menu and then pressed the Windows key. It also works.
<fidencio>
but system ones
<fidencio>
okay.
<zeenix>
fidencio: yeah, sorry. I should have provided you with steps but you didn't ask either and claimed you can't reproduce :)
<zeenix>
but let's not play any blame games here :)
<zeenix>
<zeenix>
In Boxes, user would expect the kbd shortcuts to topbar buttons to work when they ungrab kbd but seems all events (but system ones, e.g super key) still goes to display
<jjongsma>
is this the issue where if the mouse cursor is on top of the display widget, the keys get sent to the display?
<zeenix>
jjongsma: indeed
<jjongsma>
if you move your mouse cursor off the window does it do what you want?
<jjongsma>
(without clicking)
<zeenix>
jjongsma: let me try but i would expect keys to not be sent to display even if mouse is hovering over the display since user explicitly ungrabbed kbd for a reason
<zeenix>
jjongsma: actually, if i move the mouse, the kbd gets grabbed again
<zeenix>
before i can take the pointer outside the display widget
<jjongsma>
what mouse mode?
<fidencio>
zeenix: I can reproduce it here
<fidencio>
jjongsma: I can reproduce it even when moving the cursor off the window
<jjongsma>
oh really?
<jjongsma>
only in boxes, or all spice-gtk apps?
<fidencio>
jjongsma: with boxes for sure. let me try vv
<zeenix>
jjongsma: client-side
<jjongsma>
I suspect that ungrabbing focus in client mouse mode is probably not well tested since you can just 'ungrab' by moving the mouse out of the window. So probably not many people explicitly use the ungrab keys in this mode.
<zeenix>
jjongsma: it's very important to a11y
<zeenix>
s/to/for/
<jjongsma>
zeenix, interesting, in what way?
<zeenix>
jjongsma: UI needs to be completely accessible through kbd
<fidencio>
jjongsma: moving the mouse of the window doesn't help either. it seems to happen, somehow, whenever the app has focus
<zeenix>
jjongsma: e.g visually impaired folks rely on kbd quite a lot
<jjongsma>
zeenix, but the spice display itself is not accessible.
<zeenix>
jjongsma: does not matter
<zeenix>
jjongsma: or at least it's not relevant here
<fidencio>
zeenix: please, file a bug
<jjongsma>
yeah, just noting.