]> Dogcows Code - chaz/openbox/commitdiff
can build trees with modifiers
authorDana Jansens <danakj@orodu.net>
Mon, 30 Dec 2002 06:44:14 +0000 (06:44 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 30 Dec 2002 06:44:14 +0000 (06:44 +0000)
src/bindings.cc

index a6f7addbb54dc912d2ede0dc2dcad9120e983923..c4469bb186e82134f9fdef9cf15a94819ceaae0e 100644 (file)
@@ -39,9 +39,14 @@ void OBBindings::display()
 
 static bool translate(const std::string str, Binding &b)
 {
-  KeySym sym = XStringToKeysym(const_cast<char *>(str.c_str()));
+  std::string::size_type keybegin = str.find_last_of('-');
+  std::string key(str, keybegin != std::string::npos ? keybegin + 1 : 0);
+
+  // XXX: get some modifiers up in the hizzie
+  
+  KeySym sym = XStringToKeysym(const_cast<char *>(key.c_str()));
   if (sym == NoSymbol) return false;
-  b.modifiers = Mod1Mask;
+  b.modifiers = Mod1Mask; // XXX: no way
   b.key = XKeysymToKeycode(otk::OBDisplay::display, sym);
   return b.key != 0;
 }
This page took 0.023641 seconds and 4 git commands to generate.