<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body><span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Focus events are not always matched"
href="https://bugzilla.gnome.org/show_bug.cgi?id=780422">bug 780422</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>ofourdan@redhat.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Focus events are not always matched"
href="https://bugzilla.gnome.org/show_bug.cgi?id=780422#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Focus events are not always matched"
href="https://bugzilla.gnome.org/show_bug.cgi?id=780422">bug 780422</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span></b>
<pre>So, I took a closer looks at this issue.
I reckon the problem comes from device_emit_grab_crossing() in
gdkdevice-wayland.c *and* the way spice-gtk uses grabs.
Basically, spice-gtk issue a grab each time the pointer enters the spice-gtk
window and release the grab when the pointer leaves the widget.
When the grab is on the keyboard (as it is here), a focus event is sent (either
focus_in of focus_out).
In gdk_wayland_device_grab(), device_emit_grab_crossing() is called only if the
current keyboard focus differs from the window on which the grab is issued.
Similarly, in gdk_wayland_device_ungrab(), device_emit_grab_crossing() is
called only if the window with a grab (if any) differs from the currently
focused window.
But entering/leaving widget does not atually change keyboard focus (it's an
emulated event), so when the user clicks on another window, a real focus_out
event is emitted.
So spice-gtk logic of issuing a _keyboard_ grab/ungrab on _pointer_ enter/leave
events defeats the logic in gdkdevice-wayland.c</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>