Commit 9737ec94 authored by Nate Graham's avatar Nate Graham 🔩
Browse files

[emojier] Set window ID so it can be raised when already open

BUG: 426632
FIXED-IN: 5.21
parent 5e2550ac
kconfig_add_kcfg_files(emojier_KCFG emojiersettings.kcfgc GENERATE_MOC)
add_executable(ibus-ui-emojier-plasma emojier.cpp resources.qrc ${emojier_KCFG})
target_link_libraries(ibus-ui-emojier-plasma Qt5::Widgets ${IBUS_LIBRARIES} ${GOBJECT_LIBRARIES} Qt5::Quick KF5::ConfigGui KF5::I18n KF5::CoreAddons KF5::Crash KF5::QuickAddons KF5::DBusAddons)
target_link_libraries(ibus-ui-emojier-plasma Qt5::Widgets ${IBUS_LIBRARIES} ${GOBJECT_LIBRARIES} Qt5::Quick Qt5::X11Extras KF5::ConfigGui KF5::I18n KF5::CoreAddons KF5::Crash KF5::QuickAddons KF5::DBusAddons KF5::WindowSystem)
install(TARGETS ibus-ui-emojier-plasma ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES org.kde.plasma.emojier.desktop DESTINATION ${DATA_INSTALL_DIR}/kglobalaccel)
......
......@@ -44,6 +44,9 @@
#include <QDBusMessage>
#include <QDBusConnectionInterface>
#include <QSessionManager>
#include <QX11Info>
#include <kstartupinfo.h>
#include "emojiersettings.h"
#include "config-workspace.h"
......@@ -373,6 +376,10 @@ int main(int argc, char** argv)
auto w = qobject_cast<QQuickWindow*>(object);
if (!w)
continue;
if (w && QX11Info::isPlatformX11())
KStartupInfo::setNewStartupId(w, QX11Info::nextStartupId());
w->setVisible(true);
w->raise();
}
......
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