diff --git a/ioncore/focus.c b/ioncore/focus.c index f5c1e44f..0ffd0687 100644 --- a/ioncore/focus.c +++ b/ioncore/focus.c @@ -81,7 +81,7 @@ static void region_focuslist_deinit(WRegion *reg) * actually have received the focus when this function returns. */ EXTL_EXPORT -WRegion *ioncore_goto_previous() +WRegion *ioncore_goto_previous(int count) { WRegion *next; @@ -99,7 +99,7 @@ WRegion *ioncore_goto_previous() next!=NULL; next=next->active_next){ - if(!REGION_IS_ACTIVE(next)) + if(!REGION_IS_ACTIVE(next) && --count <= 0) break; } diff --git a/ioncore/focus.h b/ioncore/focus.h index 47b952a6..bca5423c 100644 --- a/ioncore/focus.h +++ b/ioncore/focus.h @@ -52,7 +52,7 @@ extern void region_focuslist_move_after(WRegion *reg, WRegion *after); /* Notify the focus handling that the region is deinit'ing */ extern void region_focus_deinit(WRegion *reg); -extern WRegion *ioncore_goto_previous(); +extern WRegion *ioncore_goto_previous(int count); /* Handlers to this hook should take WRegion* as parameter. */ extern WHook *region_do_warp_alt;