xdg_activation_v1 not working with popovers
Steps to reproduce
- Open GNOME Text Editor
- Open Nautilus
- Open a file in GNOME Text Editor via the context menu -> Open with Text Editor
GNOME Shell shows a "Text Editor is ready" notification
Text Editor gets focus
- GTK 4.10.1
- GNOME Shell 44.0 with 44.0 applications
- NixOS unstable
I did some debugging and this is caused by GTK chosing not to pass a surface to the xdg_activation_v1 interface here.
Basically since the click is done in a popover, wl_surface is NULL (probably because
gdk_wayland_device_get_focus returns NULL).
This causes Mutter to reject the activation here as it requires both seat and surface to be present to consider the activation safe to perform.
Tagging @carlosg as you did most of the implementation on both sides.