Skip to content
Commit 71c0763c authored by Jin Liu's avatar Jin Liu Committed by Nicolas Fella
Browse files

OpenFileManagerWindowJob: fix opening multiple instances under Wayland

The Problem:
Under wayland, when there's only one Dolphin window, "Show Target" in
Dolphin's right click menu opens multiple duplicate Dolphin windows.

The Cause:
DolphinMainWindow::showTarget
=> KIO::OpenFileManagerWindowJob::highlightInFileManager
=> KWindowSystem::requestXdgActivationToken
=> on KWindowSystem::xdgActivationTokenArrived signal
=> dbus call org.freedesktop.FileManager1 ShowItems
=> Dolphin::DBusInterface::ShowItems
=> Dolphin::openNewWindow
=> KIO::ApplicationLauncherJob
=> KIO::KProcessRunner
=> Calls KWindowSystem::requestXdgActivationToken under Wayland. Loop.

The Fix:
Pass Qt::SingleShotConnection flag to QObject::connect() to avoid the
loop.

BUG: 463931
parent bfc7b2e9
Pipeline #333353 passed with stage
in 47 minutes and 18 seconds
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