Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes goto_previous to accept an integer number of which previous #374

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ioncore/focus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion ioncore/focus.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down