From 9e18d437a7b157a7207c47ca483d1c506019ed9c Mon Sep 17 00:00:00 2001 From: garbeam Date: Thu, 8 Dec 2005 21:31:43 +0200 Subject: [PATCH] fixed keyboard driven frame selection --- cmd/wm/page.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmd/wm/page.c b/cmd/wm/page.c index 329dcc51..4a8a2888 100644 --- a/cmd/wm/page.c +++ b/cmd/wm/page.c @@ -147,10 +147,14 @@ static void select_frame(void *obj, char *cmd) if (!f || !cmd) return; a = f->area; - if (!strncmp(cmd, "prev", 5)) - cext_stack_top_item(a->layout->get_frames(a), cext_stack_get_up_item(a->layout->get_frames(a), f)); - else if (!strncmp(cmd, "next", 5)) - cext_stack_top_item(a->layout->get_frames(a), cext_stack_get_down_item(a->layout->get_frames(a), f)); + if (!strncmp(cmd, "prev", 5)) { + f = cext_stack_get_up_item(a->layout->get_frames(a), f); + cext_stack_top_item(a->layout->get_frames(a), f); + } + else if (!strncmp(cmd, "next", 5)) { + f = cext_stack_get_down_item(a->layout->get_frames(a), f); + cext_stack_top_item(a->layout->get_frames(a), f); + } if (old != f) { sel_frame(f, cext_list_get_item_index(&a->page->areas, a) == 0); center_pointer(f);