This code got introduced with 3c21f66bf30810fcb25dfe8c3c0960df270dc416 trying to mimic gdk_spawn_on_screen(), but does not: what gdk_spawn_on_screen() did (on X11) was to append the screen number to the display, so that it worked on a multi-screen setup where the app is not on the default X screen.
However, the code that got introduced just sets the display, which is gonna be already there anyway (yet possibly loosing the default screen in the process?), and AFAIK GDK dropped support for multi-screen setups anyway (not to be confused with multi-monitor with e.g. Xinerama).
We should actually be better of without any of this, as it most likely doesn't do what it is supposed to, nobody needs what it failed to do, and it breaks XWayland on Wayland.
Fixes #1387.
:warning: I didn't actually test that much, and not at all on Wayland. But it should help.
This code got introduced with 3c21f66bf30810fcb25dfe8c3c0960df270dc416 trying to mimic
gdk_spawn_on_screen()
, but does not: whatgdk_spawn_on_screen()
did (on X11) was to append the screen number to the display, so that it worked on a multi-screen setup where the app is not on the default X screen.However, the code that got introduced just sets the display, which is gonna be already there anyway (yet possibly loosing the default screen in the process?), and AFAIK GDK dropped support for multi-screen setups anyway (not to be confused with multi-monitor with e.g. Xinerama).
We should actually be better of without any of this, as it most likely doesn't do what it is supposed to, nobody needs what it failed to do, and it breaks XWayland on Wayland.
Fixes #1387.
:warning: I didn't actually test that much, and not at all on Wayland. But it should help.