Skip to content

gdk/wayland: set requesting surface to xdg-activation

The argument to xdg_activation_token_v1_set_surface is documented to be the surface requesting the activation, not the surface to be activated, which is given later when calling xdg_activation_v1_activate (c.f. https://gitlab.freedesktop.org/wayland/wayland-protocols/-/commit/36cee4bdbcaf3a75f567315809953b5e21d703da)

Use the same logic as in gdk_wayland_app_launch_context_get_startup_notify_id, i.e. if we have a surface with focus, set that, otherwise set NULL.

This fixes requesting urgent/focus on wlroots (compositors like Sway, etc.), which was blocked as the surface requesting the activation didn't have focus.

Edited by Joan Bruguera

Merge request reports