]> Dogcows Code - chaz/openbox/blobdiff - src/openbox.cc
print an error for invalid modifier keys
[chaz/openbox] / src / openbox.cc
index ff42f58b4f318fb54e2f09d841624cfeac16c99a..cf05e2a87a102dcb9d1180556af3129bab4640d6 100644 (file)
@@ -9,6 +9,7 @@
 #include "client.hh"
 #include "screen.hh"
 #include "actions.hh"
+#include "bindings.hh"
 #include "otk/property.hh"
 #include "otk/display.hh"
 #include "otk/assassin.hh"
@@ -145,8 +146,23 @@ Openbox::Openbox(int argc, char **argv)
   sigaction(SIGHUP, &action, (struct sigaction *) 0);
 
   _property = new otk::OBProperty();
-
   _actions = new OBActions();
+  _bindings = new OBBindings();
+
+  OBBindings::StringVect v;
+  v.push_back("C-A-x");
+  v.push_back("C-y");
+  v.push_back("v");
+  _bindings->add(v, 1);
+  v.clear();
+//  v.push_back("C-x");
+//  v.push_back("C-z");
+  v.push_back("a");
+  _bindings->add(v, 2);
+
+  printf("CHAINS:\n");
+  _bindings->display();
+  ::exit(0);
 
   setMasterHandler(_actions); // set as the master event handler
 
@@ -198,6 +214,10 @@ Openbox::~Openbox()
   _state = State_Exiting; // time to kill everything
 
   std::for_each(_screens.begin(), _screens.end(), otk::PointerAssassin());
+
+  delete _bindings;
+  delete _actions;
+  delete _property;
   
   // close the X display
   otk::OBDisplay::destroy();
@@ -300,6 +320,7 @@ void Openbox::eventLoop()
 {
   while (!_doshutdown) {
     dispatchEvents(); // from OtkEventDispatcher
+    XFlush(otk::OBDisplay::display); // flush here before we go wait for timers
     _timermanager.fire();
   }
 }
This page took 0.022289 seconds and 4 git commands to generate.