Guard against reconfiguring wayland specific input on X11

reconfigure is hooked up to a config watcher that is applicable on X11
and wayland.

A runtime check is added to reconfigure, if we're not initialised we
have nothing to reconfigure. initialise calls reconfigure at the end of
the method.
This commit is contained in:
David Edmundson 2022-10-12 23:50:38 +01:00
parent 28899df485
commit a43ef8ac91

View file

@ -156,6 +156,9 @@ void KeyboardInputRedirection::init()
void KeyboardInputRedirection::reconfigure() void KeyboardInputRedirection::reconfigure()
{ {
if (!m_inited) {
return;
}
if (waylandServer()->seat()->keyboard()) { if (waylandServer()->seat()->keyboard()) {
const auto config = InputConfig::self()->inputConfig()->group(QStringLiteral("Keyboard")); const auto config = InputConfig::self()->inputConfig()->group(QStringLiteral("Keyboard"));
const int delay = config.readEntry("RepeatDelay", 660); const int delay = config.readEntry("RepeatDelay", 660);