<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - key event going to display even with keyboard ungrabbed"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93249#c23">Comment # 23</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - key event going to display even with keyboard ungrabbed"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=93249">bug 93249</a>
              from <span class="vcard"><a class="email" href="mailto:marcandre.lureau@gmail.com" title="Marc-Andre Lureau <marcandre.lureau@gmail.com>"> <span class="fn">Marc-Andre Lureau</span></a>
</span></b>
        <pre>(In reply to Zeeshan Ali from <a href="show_bug.cgi?id=93249#c22">comment #22</a>)
<span class="quote">> (In reply to Marc-Andre Lureau from <a href="show_bug.cgi?id=93249#c21">comment #21</a>)
> > spice-gtk input behaviour is rather simple:
> > - has no focus -> no input
> > - has focus -> gtk input is handled by the widget

> And this is normal for most widget which do not need the concept of
> 'keyboard grab'.</span >

what does this have to do with 'keyboard grab'? there are 3 states here, and
you seem to agree they make sense. 

<span class="quote">> 
> > - has focus + grab -> all keyboard input (including "system keys", except
> > vt-switch) is handled by the widget

> That is fine too.

> The issue here is has_focus + ungrabbed case. Like I said before, If user
> explicitly requested keyboard ungrab (and provided spice and/or App does
> make sure user knows keyboard in ungrabbed currently), all key events should
> really go to client/host and none to guest.</span >

so you want 4th state (I wish you explained this a bit more clearly from the
start)

- after ungrab, the widget should take no input == loose the focus

Imho this does't make sense, how would you get back to the focus state? I
really this would be confusing for the user.

Anyway, you can experiment with this in Boxes, when the keyboard grab is lost,
you can just change the focus to another widget.

<span class="quote">> > When the widget has the focus, there is no handling of focus chain built-in
> > the widget, but like any other accelerator, you can set one in your app.

> I don't know what you mean. Boxes has accelerators for display state but
> they currently don't work even when keyboard is ungrabbed and that's the
> issue here.</span >

It should work, it works with virt-viewer.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>