inputmethod: fix how we update to input method changes

Properly notify about changes from the kcm and properly integrate them.
So far it only worked between having and not having a keyboard.
master
Aleix Pol 3 years ago committed by Aleix Pol Gonzalez
parent baa246fbb7
commit cadb13de0e

@ -4,3 +4,4 @@ Mutators=true
DefaultValueGetters=true
GenerateProperties=true
ParentInConstructor=true
Notifiers=true

@ -216,7 +216,8 @@ void ApplicationWayland::refreshSettings(const KConfigGroup &group, const QByteA
return;
}
InputMethod::self()->setInputMethodCommand(group.readEntry("InputMethod", QString()));
KDesktopFile file(group.readEntry("InputMethod", QString()));
InputMethod::self()->setInputMethodCommand(file.desktopGroup().readEntry("Exec", QString()));
}
void ApplicationWayland::startSession()
@ -228,9 +229,7 @@ void ApplicationWayland::startSession()
m_settingsWatcher = KConfigWatcher::create(kwinSettings);
connect(m_settingsWatcher.data(), &KConfigWatcher::configChanged, this, &ApplicationWayland::refreshSettings);
KConfigGroup group = kwinSettings->group("Wayland");
KDesktopFile file(group.readEntry("InputMethod", QString()));
InputMethod::self()->setInputMethodCommand(file.desktopGroup().readEntry("Exec", QString()));
refreshSettings(kwinSettings->group("Wayland"), {"InputMethod"});
}
// start session

Loading…
Cancel
Save