[Wayland-bugs] [Bug 780422] New: Focus events are not always matched
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Wed Mar 22 21:17:03 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=780422
Bug ID: 780422
Summary: Focus events are not always matched
Classification: Platform
Product: gtk+
Version: 3.22.x
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: Backend: Wayland
Assignee: gtk-bugs at gtk.org
Reporter: jonathon at quotidian.org
QA Contact: gtk-bugs at gtk.org
CC: rob at robster.org.uk, wayland-bugs at lists.freedesktop.org
GNOME version: ---
In virt-viewer, we are getting a warning in the terminal when running under
wayland.
Some very short background: virt-viewer does certain things (e.g. grab the
keyboard, enable usb auto-redirect, etc) when the spice widget gets focus, and
"undoes" those things when the widget loses focus.
The reason that we are getting a warning is because we are not getting matched
focus-in and focus-out events. When running under wayland in Fedora 25, if we
click inside the virt-viewer window, a focus-in event is generated. However,
when clicking outside of the window, *two* focus-out events are generated. The
handler for the first event runs without problem, but the second one generates
a warning since it is attempting to perform a task that has already been
performed by the first handler.
I bisected gtk+ to determine when the problem appeared, and came up with the
following commit:
commit de2268000d7e3eb5e84603810f9a6f971efb1072
Author: Carlos Garnacho <carlosg at gnome.org>
Date: Wed Jun 24 17:48:18 2015 +0200
wayland: Ensure device grabs generate crossing/focus events
On X11 this is something the windowing system does for us, which the
wayland backend should emulate, being grabs completely client-side.
So, if the grab and current focus windows differ, make sure we emit
focus/crossing events as it corresponds to the grab device.
I've not yet been able to create a minimal test case to trigger this bug in
gtk+.
This bug was initially opened in the spice bug tracker, but after discussing it
with some Gtk+ developers, they suggested opening a bug in Gtk+. Original bug
is here: https://bugs.freedesktop.org/show_bug.cgi?id=99296
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20170322/b8378f0d/attachment.html>
More information about the wayland-bugs
mailing list