more debug output changes
This commit is contained in:
parent
40f3dfbaad
commit
5f8e2b75fa
2 changed files with 10 additions and 7 deletions
|
@ -214,7 +214,6 @@ void OBBindings::assimilate(BindingTree *node)
|
||||||
if (!_keytree.first_child) {
|
if (!_keytree.first_child) {
|
||||||
// there are no nodes at this level yet
|
// there are no nodes at this level yet
|
||||||
_keytree.first_child = node;
|
_keytree.first_child = node;
|
||||||
return;
|
|
||||||
} else {
|
} else {
|
||||||
a = _keytree.first_child;
|
a = _keytree.first_child;
|
||||||
last = a;
|
last = a;
|
||||||
|
@ -225,9 +224,6 @@ void OBBindings::assimilate(BindingTree *node)
|
||||||
if (a->binding != b->binding) {
|
if (a->binding != b->binding) {
|
||||||
a = a->next_sibling;
|
a = a->next_sibling;
|
||||||
} else {
|
} else {
|
||||||
printf("a: %s %d %d\n", a->text.c_str(), a->binding.key, a->binding.modifiers);
|
|
||||||
printf("b: %s %d %d\n", b->text.c_str(), b->binding.key, b->binding.modifiers);
|
|
||||||
printf("moving up one in b\n");
|
|
||||||
tmp = b;
|
tmp = b;
|
||||||
b = b->first_child;
|
b = b->first_child;
|
||||||
delete tmp;
|
delete tmp;
|
||||||
|
@ -271,6 +267,8 @@ bool OBBindings::add_key(const StringVect &keylist, int id)
|
||||||
if (!(tree = buildtree(keylist, id)))
|
if (!(tree = buildtree(keylist, id)))
|
||||||
return false; // invalid binding requested
|
return false; // invalid binding requested
|
||||||
|
|
||||||
|
print_branch(tree, " Adding: ");
|
||||||
|
|
||||||
if (find_key(tree) != -1) {
|
if (find_key(tree) != -1) {
|
||||||
// conflicts with another binding
|
// conflicts with another binding
|
||||||
destroytree(tree);
|
destroytree(tree);
|
||||||
|
@ -279,6 +277,11 @@ bool OBBindings::add_key(const StringVect &keylist, int id)
|
||||||
|
|
||||||
// assimilate this built tree into the main tree
|
// assimilate this built tree into the main tree
|
||||||
assimilate(tree); // assimilation destroys/uses the tree
|
assimilate(tree); // assimilation destroys/uses the tree
|
||||||
|
|
||||||
|
printf("Added!\n");
|
||||||
|
print_branch(&_keytree, "");
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,10 +163,10 @@ Openbox::Openbox(int argc, char **argv)
|
||||||
v.push_back("C-a");
|
v.push_back("C-a");
|
||||||
_bindings->add_key(v, 3);
|
_bindings->add_key(v, 3);
|
||||||
|
|
||||||
_bindings->add_mouse("A-1", 1);
|
// _bindings->add_mouse("A-1", 1);
|
||||||
|
|
||||||
printf("CHAINS:\n");
|
// printf("CHAINS:\n");
|
||||||
_bindings->display();
|
// _bindings->display();
|
||||||
::exit(0);
|
::exit(0);
|
||||||
|
|
||||||
setMasterHandler(_actions); // set as the master event handler
|
setMasterHandler(_actions); // set as the master event handler
|
||||||
|
|
Loading…
Reference in a new issue