Merge pull request #3279 from Streetwalrus/next

Activate the focused child when scrolling over tab/stack decorations
This commit is contained in:
Orestis 2018-05-05 13:49:13 +03:00 committed by GitHub
commit 1cdb1ab721
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -235,6 +235,7 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod
* container the user scrolled on. */
Con *focused = con->parent;
focused = TAILQ_FIRST(&(focused->focus_head));
con_activate(con_descend_focused(focused));
/* To prevent scrolling from going outside the container (see ticket
* #557), we first check if scrolling is possible at all. */
bool scroll_prev_possible = (TAILQ_PREV(focused, nodes_head, nodes) != NULL);

View File

@ -53,7 +53,7 @@ open_window;
cmd 'splitv';
my $last = open_window;
# Second child of the outer horizontal split, next to the tabbed one.
open_window;
my $outside = open_window;
cmd 'move right, move right';
cmd '[id=' . $first->id . '] focus';
@ -76,4 +76,9 @@ is($x->input_focus, $first->id, 'First window focused through scrolling');
scroll_up;
is($x->input_focus, $first->id, 'Scrolling again doesn\'t focus the whole sibling');
# Try scrolling with another window focused
cmd '[id=' . $outside->id . '] focus';
scroll_up;
is($x->input_focus, $first->id, 'Scrolling from outside the tabbed container works');
done_testing;