X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fwindow.c;h=ef85e3f2651f4de44bd99798c490b40d36f2926c;hb=7cbc2c68d146433b1d438d60406ca05e14a523ce;hp=80aee2f7b07de1d00cae7a43bd0e4c002b6ea030;hpb=b8f0bfa1731a8890b172087f77cea42be342d8fc;p=projects%2Fchimara%2Fchimara.git diff --git a/libchimara/window.c b/libchimara/window.c index 80aee2f..ef85e3f 100644 --- a/libchimara/window.c +++ b/libchimara/window.c @@ -202,8 +202,8 @@ glk_window_get_sibling(winid_t win) if(G_NODE_IS_ROOT(win->window_node)) return NULL; if(win->window_node->next) - return (winid_t)win->window_node->next; - return (winid_t)win->window_node->prev; + return (winid_t)win->window_node->next->data; + return (winid_t)win->window_node->prev->data; } /** @@ -416,16 +416,16 @@ glk_window_get_root() * A C * * - * After the first split, the new pair window (O1, which covers the whole - * screen) knows that its first child (A) is above the second, and gets 50% of - * its own area. (A is the key window for this split, but a proportional split - * doesn't care about key windows.) + * The initial window is A. After the first split, the new pair window (O1, + * which covers the whole screen) knows that its new child (B) is below A, and + * gets 50% of its own area. (B is the key window for this split, but a + * proportional split doesn't care about key windows.) * - * After the second split, all this remains true; O1 knows that its first child - * gets 50% of its space, and A is O1's key window. But now O1's first child is - * O2 instead of A. The newer pair window (O2) knows that its first child (C) - * is above the second, and gets a fixed size of two rows. (As measured in C's - * font, because C is O2's key window.) + * After the second split, all this remains true; O1 knows + * that its first child gets 50% of its space, and B is O1's key window. But + * now O1's first child is O2 instead of A. The newer pair window (O2) knows + * that its first child (C) is above the second, and gets a fixed size of two + * rows. (As measured in C's font, because C is O2's key window.) * * If we split C, now, the resulting pair will still be two C-font rows high * — that is, tall enough for two lines of whatever font C displays. For