[Wayland] GTK should handle wl_seats correctly, tearing down a seat and creating a new one
Steps to reproduce
WSL has a bug that triggers this issue, see WSL bug. WSL disconnects and reconnects the Wayland session, this is working for most application but not for the GTK ones such as xfce4-terminal. Ignore the part of the bug in which windows are not shown, the important part is that when they are shown the GTK applications are visible, display output but do not accept input. I am unsure how to reproduce this in other environment, so I am outlining the current WSL behavior.
In windows WSL:
- Open an application such as xfce4-terminal or gtk4-demo-application (4.6.9, Running against GTK 4.6.9).
- Kill the wayland session by changing network (bug per 2024-01-15 will hide all windows).
- Open X application - all applications will be visible now, the wayland is reconnected.
- Notice that only GTK applications, in our example xfce4-terminal or gtk4-demo-application, are not accepting input including close/max/min.
This cannot be reproduced when GDK_BACKEND=x11
.
Current behavior
When the wayland session is resumed the application is not responsive to input.
Expected outcome
Resume input when wayland session is resumed.
Version information
ubuntu 22.04, GTK 4.6.9 libgtk-4-1/jammy-updates,now 4.6.9+ds-0ubuntu0.22.04.1 amd64 [installed,automatic]
Additional information
Please review the bug and logs of WSL, especially this comment of hideyukn88 from microsoft who found: "This indicate the possible issue I described at 2) in #1092 (closed) (comment), which application doesn't reinitialize wl_keyboard upon wl_seat recreation timely, at least, before the application gains the input focus, so since setting focus is failed, no keyboard and mouse inputs are sent to the application."
Thanks,