Don’t force wrapping when focusing in a direction would work (+test)
Think of the following layout: ------------- | tab | | | con | win | | | | ------------- The tabbed container on the left has two children. Assume you have focused the second/right child in the tabbed container. i3 used to focus the first/left container of the tabbed container when using 'focus right' (it wrapped focus). With this commit, the default behaviour is to instead focus the window on the right of the screen. The intention is to make focus switching more intuitive, especially with tabbed containers supporting 'focus left'/'focus right' in tree. You should end up using less 'focus parent' :). You can force the old behaviour with 'force_focus_wrapping true' in your config. Code coverage is 62.5% with this commit.
This commit is contained in:
@ -235,6 +235,7 @@ void parse_file(const char *f) {
|
||||
%token TOK_NONE "none"
|
||||
%token TOK_1PIXEL "1pixel"
|
||||
%token TOKFOCUSFOLLOWSMOUSE "focus_follows_mouse"
|
||||
%token TOK_FORCE_FOCUS_WRAPPING "force_focus_wrapping"
|
||||
%token TOKWORKSPACEBAR "workspace_bar"
|
||||
%token TOK_DEFAULT "default"
|
||||
%token TOK_STACKING "stacking"
|
||||
@ -285,6 +286,7 @@ line:
|
||||
| workspace_layout
|
||||
| new_window
|
||||
| focus_follows_mouse
|
||||
| force_focus_wrapping
|
||||
| workspace_bar
|
||||
| workspace
|
||||
| assign
|
||||
@ -592,6 +594,14 @@ focus_follows_mouse:
|
||||
}
|
||||
;
|
||||
|
||||
force_focus_wrapping:
|
||||
TOK_FORCE_FOCUS_WRAPPING bool
|
||||
{
|
||||
DLOG("force focus wrapping = %d\n", $2);
|
||||
config.force_focus_wrapping = $2;
|
||||
}
|
||||
;
|
||||
|
||||
workspace_bar:
|
||||
TOKWORKSPACEBAR bool
|
||||
{
|
||||
|
Reference in New Issue
Block a user