[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kxkb
From:       Andy Rysin <arysin () yahoo ! com>
Date:       2004-10-10 23:00:03
Message-ID: 20041010230003.3A5FB16BB9 () office ! kde ! org
[Download RAW message or body]

CVS commit by rysin: 

- fix finding X11 dir (Bug #80970)


  M +10 -1     rules.cpp   1.40


--- kdebase/kxkb/rules.cpp  #1.39:1.40
@@ -1,2 +1,3 @@
+#include <qwindowdefs.h>
 #include <qfile.h>
 #include <qtextstream.h>
@@ -43,4 +44,11 @@ KeyRules::KeyRules():
 
   QString rulesFile;
+  Display *dpy = qt_xdisplay();
+  XkbRF_VarDefsRec vd;
+  char *tmp= NULL;
+  if (XkbRF_GetNamesProp(dpy,&tmp,&vd) && tmp) 
+    rulesFile = X11_DIR + QString("xkb/rules/%1").arg(tmp);
+  else {
+    // old way
   for(int ii=0; ii<2; ii++)
     if( QFile(X11_DIR + QString(rulesFileList[ii])).exists() ) {
@@ -48,4 +56,5 @@ KeyRules::KeyRules():
         break;
     }
+  }
 
   if( rulesFile.isEmpty() ) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic