There's something I don't understand about your debugging: setting of seat->keyboard_focus happens synchronously with receiving the Wayland focus event, so this does not actually matter:
> The likely condition is that the client is still processing its Wayland socket when the pad re-registers, so GTK has not yet handled wl_keyboard.enter while mutter already considers that client focused. The only thing that matters is the ordering of the Wayland events from the server. You should be able confirm the ordering of Wayland events by running an affected app from a terminal with the WAYLAND_DEBUG=client environment variable, and see if wl_keyboard::focus arrives before or after zwp_tablet_pad_group_v2::mode_switch If confirmed, is it acceptable for a Wayland compositor to send tablet::mode_switch events to clients without focus? If not, this is a mutter bug. If yes, then this is a gtk4 bug. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2172827 Title: gtk4 4.22.4: SIGSEGV in gdk_surface_handle_event() on a tablet-pad event carrying no surface (GDK_PAD_GROUP_MODE) after USB re- enumeration To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gtk4/+bug/2172827/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
