Connect to dbus signal reloadConfig from org.kde.keyboar /Layouts

By connecting to the signal KWin can reload the keyboard layout
configuration and adjust to changes in the configuration module.
This commit is contained in:
Martin Gräßlin 2016-02-22 08:17:45 +01:00
parent 606d2ce362
commit 4d7c8ac372
2 changed files with 15 additions and 0 deletions

View file

@ -387,6 +387,18 @@ void KeyboardInputRedirection::init()
}
);
QDBusConnection::sessionBus().connect(QString(),
QStringLiteral("/Layouts"),
QStringLiteral("org.kde.keyboard"),
QStringLiteral("reloadConfig"),
this,
SLOT(reconfigure()));
m_xkb->reconfigure();
}
void KeyboardInputRedirection::reconfigure()
{
m_xkb->reconfigure();
}

View file

@ -113,6 +113,9 @@ public:
return m_xkb->modifiers();
}
private Q_SLOTS:
void reconfigure();
private:
InputRedirection *m_input;
bool m_inited = false;