<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - keyboard focus problem on dismiss of menus under wayland"
href="https://bugzilla.gnome.org/show_bug.cgi?id=762756#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - keyboard focus problem on dismiss of menus under wayland"
href="https://bugzilla.gnome.org/show_bug.cgi?id=762756">bug 762756</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>Ok, could be because the Wayland and X11 backend differ wrt focus handling.
The X server will emit FocusIn and FocusOut events on grab/ungrab and the X11
backend handles that in _gdk_device_manager_core_handle_focus() taking into
account things like the mode and detail given by the XEvent. The X11 backend
will not necessarily emit the focus change GdkEvent.
The Wayland backend tries to emulate that but emits the focus change GdkEvent
quite unconditionally, and I reckon this could be the problem.
Relevant code:
For X11:
<a href="https://git.gnome.org/browse/gtk+/tree/gdk/x11/gdkdevicemanager-core-x11.c#n811">https://git.gnome.org/browse/gtk+/tree/gdk/x11/gdkdevicemanager-core-x11.c#n811</a>
For Wayland: gdk_wayland_device_grab()
<a href="https://git.gnome.org/browse/gtk+/tree/gdk/wayland/gdkdevice-wayland.c#n642">https://git.gnome.org/browse/gtk+/tree/gdk/wayland/gdkdevice-wayland.c#n642</a>
and device_emit_grab_crossing()
<a href="https://git.gnome.org/browse/gtk+/tree/gdk/wayland/gdkdevice-wayland.c#n600">https://git.gnome.org/browse/gtk+/tree/gdk/wayland/gdkdevice-wayland.c#n600</a></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>