From 9b8333689dc93e33c581e9d23739e2c412ea505d Mon Sep 17 00:00:00 2001 From: Chris McKenzie Date: Tue, 14 Jan 2025 11:08:54 -0800 Subject: [PATCH] Changes goto_previous to accept an integer number of which previous --- ioncore/focus.c | 4 ++-- ioncore/focus.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ioncore/focus.c b/ioncore/focus.c index f5c1e44f4..0ffd06875 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 47b952a6a..bca5423c7 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;