Skip to content

wayland: Honor startup sequence workspace on .request_focus

Carlos Garnacho requested to merge wip/carlosg/launch-on-workspace into master

We handle this in backend specific code for x11, so do the wayland bits here. We can only honor this on applications that request focus on a surface after a startup request, as we do need an explicit surface to apply the workspace on (and we don't have additional clues like WMCLASS on X11). Notably, gtk_shell1.notify_startup doesn't suffice.

Another gotcha is that the .request_focus happens when the surface is already "mapped". Due to the way x11 and the GDK api currently work (first reply on the startup id, then map a window, then request focus on that window). This means the surface will ignore at this point window->initial_workspace, so it must be actively changed.

Closes: gnome-shell#674 (closed)

Merge request reports