Commit e6eee5f9 authored by David Edmundson's avatar David Edmundson

Register unique service name when wayland keyboard interface is in use

A situation meant we want to only enable the new keyboard applet by
default on wayland, using the legacy one from the X11 daemon on X11.

We need a unique service name so that we can use DBus activation on it.
parent a0c7f997
......@@ -176,6 +176,8 @@ void KeyboardLayout::notifyLayoutChange()
}
static const QString s_keyboardService = QStringLiteral("org.kde.keyboard");
// this exists because in Plasma 5.21 we want to use a new applet for wayland, but still have the legacy system in use on X11
static const QString s_keyboardService_appletTrigger = QStringLiteral("org.kde.keyboard.wayland");
static const QString s_keyboardObject = QStringLiteral("/Layouts");
KeyboardLayoutDBusInterface::KeyboardLayoutDBusInterface(Xkb *xkb, const KConfigGroup &configGroup, KeyboardLayout *parent)
......@@ -190,11 +192,13 @@ KeyboardLayoutDBusInterface::KeyboardLayoutDBusInterface(Xkb *xkb, const KConfig
QDBusConnection::sessionBus().registerObject(s_keyboardObject, this, QDBusConnection::ExportAllSlots | QDBusConnection::ExportAllSignals);
QDBusConnection::sessionBus().registerService(s_keyboardService);
QDBusConnection::sessionBus().registerService(s_keyboardService_appletTrigger);
}
KeyboardLayoutDBusInterface::~KeyboardLayoutDBusInterface()
{
QDBusConnection::sessionBus().unregisterService(s_keyboardService);
QDBusConnection::sessionBus().unregisterService(s_keyboardService_appletTrigger);
}
void KeyboardLayoutDBusInterface::switchToNextLayout()
......
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