nixpkgs-suyu/pkgs/desktops/plasma-5.3/plasma-desktop/plasma-desktop-xkb-rules.patch
2015-05-06 07:08:20 -05:00

47 lines
1.2 KiB
Diff

From 3f175a5ecc9b4fecd8fe25cb482cf2c91aa47cf6 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Mon, 4 May 2015 22:23:21 -0500
Subject: [PATCH] xkb rules path
---
kcms/keyboard/xkb_rules.cpp | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/kcms/keyboard/xkb_rules.cpp b/kcms/keyboard/xkb_rules.cpp
index 341369d..27066d6 100644
--- a/kcms/keyboard/xkb_rules.cpp
+++ b/kcms/keyboard/xkb_rules.cpp
@@ -157,29 +157,7 @@ QString Rules::getRulesName()
QString Rules::findXkbDir()
{
- QString xkbParentDir;
-
- QString base(XLIBDIR);
- if( base.count('/') >= 3 ) {
- // .../usr/lib/X11 -> /usr/share/X11/xkb vs .../usr/X11/lib -> /usr/X11/share/X11/xkb
- QString delta = base.endsWith("X11") ? "/../../share/X11" : "/../share/X11";
- QDir baseDir(base + delta);
- if( baseDir.exists() ) {
- xkbParentDir = baseDir.absolutePath();
- }
- else {
- QDir baseDir(base + "/X11"); // .../usr/X11/lib/X11/xkb (old XFree)
- if( baseDir.exists() ) {
- xkbParentDir = baseDir.absolutePath();
- }
- }
- }
-
- if( xkbParentDir.isEmpty() ) {
- xkbParentDir = "/usr/share/X11";
- }
-
- return xkbParentDir + "/xkb";
+ return "@xkb@/share/X11/xkb";
}
static QString findXkbRulesFile()
--
2.3.6