summaryrefslogtreecommitdiff
path: root/openbox/keytree.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-02-21 13:24:19 -0500
committerDana Jansens <danakj@orodu.net>2008-02-21 13:24:19 -0500
commit198d98986bdf224ed29361541d19841339953088 (patch)
treee0a588f29ce1f1c3102da4daf05316a15e9a6cea /openbox/keytree.c
parent3263845459d15da683b7cab92fb856acbdf2800e (diff)
parentc49c2a8e408f7482f2b977d6cf97517684476ed7 (diff)
Merge branch 'backport' into work
Conflicts: openbox/openbox.c openbox/session.c
Diffstat (limited to 'openbox/keytree.c')
-rw-r--r--openbox/keytree.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/openbox/keytree.c b/openbox/keytree.c
index 56cc96d4..ca64385a 100644
--- a/openbox/keytree.c
+++ b/openbox/keytree.c
@@ -81,7 +81,8 @@ void tree_assimilate(KeyBindingTree *node)
b = node;
while (a) {
last = a;
- if (!(a->state == b->state && a->key == b->key)) {
+ /* check b->key != 0 for key bindings that didn't get translated */
+ if (!(a->state == b->state && a->key == b->key && b->key != 0)) {
a = a->next_sibling;
} else {
tmp = b;
@@ -90,7 +91,9 @@ void tree_assimilate(KeyBindingTree *node)
a = a->first_child;
}
}
- if (!(last->state == b->state && last->key == b->key)) {
+ /* check b->key != 0, and save key bindings that didn't get translated
+ as siblings here */
+ if (!(last->state == b->state && last->key == b->key && b->key != 0)) {
last->next_sibling = b;
b->parent = last->parent;
} else {
@@ -110,7 +113,10 @@ KeyBindingTree *tree_find(KeyBindingTree *search, gboolean *conflict)
a = keyboard_firstnode;
b = search;
while (a && b) {
- if (!(a->state == b->state && a->key == b->key)) {
+ /* check b->key != 0 for key bindings that didn't get translated, and
+ don't make them conflict with anything else so that they can all
+ live together in peace and harmony */
+ if (!(a->state == b->state && a->key == b->key && b->key != 0)) {
a = a->next_sibling;
} else {
if ((a->first_child == NULL) == (b->first_child == NULL)) {