Commit 4dded43b authored by Christoph Cullmann's avatar Christoph Cullmann

remove forceful window activation

use the same sequence as QtSingleApplication

BUG: 371220
parent 4ad182e4
......@@ -276,10 +276,7 @@ bool KateApp::openUrl(const QUrl &url, const QString &encoding, bool isTempFile)
bool KateApp::isOnActivity(const QString &activity)
{
for (const auto& window : m_mainWindows) {
WId id = window->winId();
KWindowInfo info = KWindowInfo(id, 0, NET::WM2Activities);
const KWindowInfo info(window->winId(), 0, NET::WM2Activities);
if (info.activities().contains(activity))
return true;
}
......@@ -468,8 +465,11 @@ void KateApp::remoteMessageReceived(const QString &message, QObject *)
}
}
if (activeKateMainWindow()) {
activeKateMainWindow()->activateWindow();
activeKateMainWindow()->raise();
if (auto win = activeKateMainWindow()) {
// like QtSingleApplication
win->setWindowState(win->windowState() & ~Qt::WindowMinimized);
win->raise();
win->activateWindow();
}
}
......@@ -38,13 +38,10 @@ void KateAppAdaptor::activate()
return;
}
win->show();
win->activateWindow();
// like QtSingleApplication
win->setWindowState(win->windowState() & ~Qt::WindowMinimized);
win->raise();
KWindowSystem::forceActiveWindow(win->winId());
KWindowSystem::raiseWindow(win->winId());
KWindowSystem::demandAttention(win->winId());
win->activateWindow();
}
bool KateAppAdaptor::openUrl(QString url, QString encoding)
......
Markdown is supported
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