]> cloud.milkyroute.net Git - dolphin.git/commit
Properly use X11 startup ids
authorNicolas Fella <nicolas.fella@gmx.de>
Wed, 14 Dec 2022 23:56:11 +0000 (00:56 +0100)
committerNicolas Fella <nicolas.fella@gmx.de>
Fri, 30 Dec 2022 12:33:01 +0000 (12:33 +0000)
commit6d21deb6e48627922fb223a4281ade46d6d230ec
tree73f35fb0c7c73d71598224e20fd0683070a399c0
parent414311b8c8c2ba7b9adb42e495368039bd33b5ad
Properly use X11 startup ids

When one instance of Dolphin activates another it passes a startupId (X11) / activation token (wayland) along.

On X11 this is passed using the DESKTOP_STARTUP_ID environment variable. The code tries to read that through KStartupInfo::startupId().

That doesn't work though, since Qt at startup reads the environment variable afterwards. However, it is nice enough to allow us to access
it through QX11Info::nextStartupId(). Use that to read the token in the first instance and pass it to the second instance like we do on Wayland

The user-facing impact of this is minimal since KStartupInfo::setNewStartupId internally falls back to KWindowSystem::forceActiveWindow when no
startupId is passed.
CMakeLists.txt
src/CMakeLists.txt
src/config-dolphin.h.cmake
src/dolphinmainwindow.cpp
src/main.cpp