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:
parent
606d2ce362
commit
4d7c8ac372
2 changed files with 15 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -113,6 +113,9 @@ public:
|
|||
return m_xkb->modifiers();
|
||||
}
|
||||
|
||||
private Q_SLOTS:
|
||||
void reconfigure();
|
||||
|
||||
private:
|
||||
InputRedirection *m_input;
|
||||
bool m_inited = false;
|
||||
|
|
Loading…
Reference in a new issue