diff --git a/runners/windows/windowsrunner.cpp b/runners/windows/windowsrunner.cpp --- a/runners/windows/windowsrunner.cpp +++ b/runners/windows/windowsrunner.cpp @@ -336,9 +336,13 @@ const QStringList parts = match.data().toString().split(QLatin1Char('_')); WindowAction action = WindowAction(parts[0].toInt()); WId w(parts[1].toULong()); - //this is needed since KWindowInfo() doesn't exist, m_windows[w] doesn't work - QHash::iterator i = m_windows.find(w); - KWindowInfo info = i.value(); + + KWindowInfo info(w, NET::WMWindowType | NET::WMDesktop | NET::WMState | NET::XAWMState | NET::WMName, + NET::WM2WindowClass | NET::WM2WindowRole | NET::WM2AllowedActions); + if (!info.valid()) { + return; + } + switch (action) { case ActivateAction: KWindowSystem::forceActiveWindow(w);