Commit 8351108c authored by David Faure's avatar David Faure

Merge branch 'release/19.12'

parents 2d6e9439 42c3d6ba
......@@ -30,6 +30,7 @@
#include <KSharedConfig>
#include <KStartupInfo>
#include <KWindowInfo>
#include <kwindowsystem_version.h>
#include <QApplication>
#include <QCommandLineParser>
......@@ -162,7 +163,13 @@ bool KateApp::startupKate()
}
// notify about start
KStartupInfo::setNewStartupId(activeKateMainWindow(), KStartupInfo::startupId());
QWidget *win = activeKateMainWindow();
#if KWINDOWSYSTEM_VERSION >= QT_VERSION_CHECK(5,62,0)
win->setAttribute(Qt::WA_NativeWindow, true);
KStartupInfo::setNewStartupId(win->windowHandle(), KStartupInfo::startupId());
#else
KStartupInfo::setNewStartupId(win, KStartupInfo::startupId());
#endif
QTextCodec *codec = m_args.isSet(QStringLiteral("encoding")) ? QTextCodec::codecForName(m_args.value(QStringLiteral("encoding")).toUtf8()) : nullptr;
bool tempfileSet = m_args.isSet(QStringLiteral("tempfile"));
......
......@@ -27,6 +27,7 @@
#include <KStartupInfo>
#include <KWindowSystem>
#include <kwindowsystem_version.h>
#include <QApplication>
......@@ -53,7 +54,12 @@ void KateAppAdaptor::activate()
win->activateWindow();
// try to raise window, see bug 407288
#if KWINDOWSYSTEM_VERSION >= QT_VERSION_CHECK(5,62,0)
win->setAttribute(Qt::WA_NativeWindow, true);
KStartupInfo::setNewStartupId(win->windowHandle(), KStartupInfo::startupId());
#else
KStartupInfo::setNewStartupId(win, KStartupInfo::startupId());
#endif
KWindowSystem::activateWindow(win->effectiveWinId());
}
......
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