Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 999568ad authored by Eike Hein's avatar Eike Hein

Stop unnecessarily killing IBus when applying keyboard layouts config

Summary: More details here: https://bugs.kde.org/show_bug.cgi?id=379930

Reviewers: xapienz, xuetianweng

Reviewed By: xapienz, xuetianweng

Subscribers: hein, xapienz, plasma-devel, #plasma

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D6956
parent ba94d116
......@@ -93,9 +93,6 @@ void KeyboardDaemon::configureKeyboard()
init_keyboard_hardware();
keyboardConfig.load();
if( keyboardConfig.configureLayouts ) {
XkbHelper::preInitialize();
}
XkbHelper::initializeKeyboardLayouts(keyboardConfig);
layoutMemory.configChanged();
......
......@@ -182,24 +182,3 @@ bool XkbHelper::initializeKeyboardLayouts(KeyboardConfig& config)
}
return false;
}
bool XkbHelper::preInitialize()
{
// stop ibus so it does not mess with our layouts, we can remove this when we integrate IM into keyboard module
QString ibusExe = QStandardPaths::findExecutable(QStringLiteral("ibus"));
if( ibusExe.isEmpty() ) {
return 0;
}
KProcess ibusProcess;
ibusProcess << ibusExe << QStringLiteral("exit");
ibusProcess.setOutputChannelMode(KProcess::SeparateChannels);
int res = ibusProcess.execute();
if( res == 0 ) {
qCWarning(KCM_KEYBOARD) << "ibus successfully stopped";
}
return 0;
}
......@@ -30,7 +30,6 @@ public:
static bool initializeKeyboardLayouts(KeyboardConfig& config);
static bool initializeKeyboardLayouts(const QList<LayoutUnit>& layouts);
static bool runConfigLayoutCommand(const QStringList& setxkbmapCommandArguments);
static bool preInitialize();
};
#endif /* XKB_HELPER_H_ */
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