diff options
-rw-r--r-- | src/tab.c | 3 | ||||
-rw-r--r-- | src/tab.h | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -75,6 +75,7 @@ update_tree_sizes(MqTab *node, guint step) static void append_child(MqTab *new_node, MqTab *parent) { + new_node->root = parent->root; new_node->parent = parent; new_node->next = NULL; new_node->prev = parent->last_child; /* May be NULL */ @@ -95,6 +96,7 @@ append_child(MqTab *new_node, MqTab *parent) static void append_sibling(MqTab *new_node, MqTab *prev_sibling) { + new_node->root = prev_sibling->root; new_node->parent = prev_sibling->parent; new_node->prev = prev_sibling; new_node->next = prev_sibling->next; /* May be NULL */ @@ -406,6 +408,7 @@ mq_tab_new_root(MqWindow *window) MqTab *tab; tab = malloc(sizeof(*tab)); + tab->root = tab; tab->parent = NULL; tab->prev = NULL; tab->next = NULL; @@ -32,6 +32,7 @@ typedef struct MqTab MqTab; #include "tab-body.h" struct MqTab { + MqTab *root; MqTab *parent; MqTab *prev; MqTab *next; |