Commit 75d90253 authored by Marco Martin's avatar Marco Martin
Browse files

Make sure preference window properly activates

by using KStartupInfo::setNewStartupId it properly activateswithout
getting blocked by Kwin focus stealing protection also when remotely
invoked from dbus
parent ccb3c767
......@@ -31,12 +31,15 @@
#include <kactivities/controller.h>
#include <klocalizedstring.h>
#include <kwindowsystem.h>
#include <KStartupInfo>
#include <KPackage/Package>
#include <KWayland/Client/plasmashell.h>
#include <KWayland/Client/surface.h>
#include <QX11Info>
DesktopView::DesktopView(Plasma::Corona *corona, QScreen *targetScreen)
: PlasmaQuick::ContainmentView(corona, nullptr)
, m_windowType(Desktop)
......@@ -285,6 +288,10 @@ void DesktopView::showConfigurationInterface(Plasma::Applet *applet)
m_configView->deleteLater();
} else {
m_configView->show();
auto window = qobject_cast<QWindow*>(m_configView);
if (window && QX11Info::isPlatformX11()) {
KStartupInfo::setNewStartupId(window, QX11Info::nextStartupId());
}
m_configView->requestActivate();
return;
}
......@@ -310,6 +317,12 @@ void DesktopView::showConfigurationInterface(Plasma::Applet *applet)
m_configView.data()->setTransientParent(this);
m_configView.data()->show();
m_configView->requestActivate();
auto window = qobject_cast<QWindow*>(m_configView);
if (window && QX11Info::isPlatformX11()) {
KStartupInfo::setNewStartupId(window, QX11Info::nextStartupId());
}
m_configView->requestActivate();
}
void DesktopView::screenGeometryChanged()
......
Supports Markdown
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