On app activation, re-use window if on same workspace/desktop, create new window otherwise
@swilmet
Submitted by Sébastien Wilmet Link to original bug (#791631)
Description
On app activation, re-use window if on same workspace, create new window otherwise.
More precisely: on app activation, either from GApplication::activate or from the command line, see if there is already a main window on the current workspace, if yes, just present it with gtk_window_present() and possibly open a new tab. Otherwise, create a new window.
Rationale: I think that's what most users want. Or at least it's what I want. If I'm on a different workspace, I want a new window. I always launch Devhelp from the terminal, either directly or via the Vim plugin, in both cases it's launched with a command line. Why do I launch Devhelp from a different workspace? This happens when I'm working on different projects at the same time, each project on a different workspace, with its own Devhelp window and the relevant documentation opened for that project.
gedit implements this with X11 APIs to know the workspace etc (in gedit-utils.c), so it doesn't work on Wayland. Maybe GDK has all the required APIs to implement this, I don't know.