X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fopenbox.cc;h=cf05e2a87a102dcb9d1180556af3129bab4640d6;hb=3661e55fba3b5f3be246b3f65d650460282018ac;hp=ff42f58b4f318fb54e2f09d841624cfeac16c99a;hpb=2ae2b257d39ea62640c2590f794e4275c6db1cd4;p=chaz%2Fopenbox diff --git a/src/openbox.cc b/src/openbox.cc index ff42f58b..cf05e2a8 100644 --- a/src/openbox.cc +++ b/src/openbox.cc @@ -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(); } }