Skip to content
Commit d37d18fa authored by Nicolas Fella's avatar Nicolas Fella Committed by Christoph Cullmann
Browse files

Properly implement window activation on X11

The current code is subtly broken in two ways:

1) KStartupInfo::startupId() will return an empty startup id. This is because QApplication reads the relevant
environment variable and clears it afterwards. To access it we need to use QX11Info::nextStartupId

2) We are reading KStartupInfo::startupId() from the wrong instance. We need to read the id from the second instance
and pass it via DBus to the first instance, like we do on Wayland with the activation token

The user-facing impact of this is minimal since KStartupInfo::setNewStartupId internally calls KWindowSystem::forceActiveWindow.

However, this code is more technically correct and may play nicer with focus stealing prevention
parent f0205a44
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment