File 0006-Stop-unnecessarily-killing-IBus-when-applying-keyboard-layouts-config.patch of Package plasma5-desktop

From: BuR_Industrial_Automation <essen.ids@br-automation.com>
Date: Mon, 02 Oct 2017 08:47:54 +0100
Subject: [PATCH 1/1] Backport - Stop unnecessarily killing IBus when applying keyboard layouts config 

Summary: 
More details here: https://bugs.kde.org/show_bug.cgi?id=379930
https://cgit.kde.org/plasma-desktop.git/diff/?id=999568ada13bc99ad360a4eaa03999821c2c8cc2
---
  kcms/keyboard/keyboard_daemon.cpp |  3 ---
  kcms/keyboard/xkb_helper.cpp      | 21 ---------------------
  kcms/keyboard/xkb_helper.h        |  1 -
  3 files changed, 0 insertions, 25 deletions

diff -Nur plasma-desktop-5.8.7_org/kcms/keyboard/keyboard_daemon.cpp plasma-desktop-5.8.7/kcms/keyboard/keyboard_daemon.cpp
--- plasma-desktop-5.8.7_org/kcms/keyboard/keyboard_daemon.cpp	2017-05-29 15:09:41.000000000 +0200
+++ plasma-desktop-5.8.7/kcms/keyboard/keyboard_daemon.cpp	2017-10-02 08:46:40.742497601 +0200
@@ -93,9 +93,6 @@
 	init_keyboard_hardware();
 
 	keyboardConfig.load();
-	if( keyboardConfig.configureLayouts ) {
-        XkbHelper::preInitialize();
-	}
 	XkbHelper::initializeKeyboardLayouts(keyboardConfig);
 	layoutMemory.configChanged();
 
diff -Nur plasma-desktop-5.8.7_org/kcms/keyboard/xkb_helper.cpp plasma-desktop-5.8.7/kcms/keyboard/xkb_helper.cpp
--- plasma-desktop-5.8.7_org/kcms/keyboard/xkb_helper.cpp	2017-05-29 15:09:41.000000000 +0200
+++ plasma-desktop-5.8.7/kcms/keyboard/xkb_helper.cpp	2017-10-02 08:47:04.118497554 +0200
@@ -182,24 +182,3 @@
 	}
 	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;
-}
diff -Nur plasma-desktop-5.8.7_org/kcms/keyboard/xkb_helper.h plasma-desktop-5.8.7/kcms/keyboard/xkb_helper.h
--- plasma-desktop-5.8.7_org/kcms/keyboard/xkb_helper.h	2017-05-29 15:09:41.000000000 +0200
+++ plasma-desktop-5.8.7/kcms/keyboard/xkb_helper.h	2017-10-02 08:46:49.242497584 +0200
@@ -30,7 +30,6 @@
 	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_ */
openSUSE Build Service is sponsored by