Activate the focused child when scrolling over tab/stack decorations

fbce834b introduced a bug where scrolling over the decoration while
another container is focused would not focus the tabbed/stacked
container itself, but would instead move focus through the currently
focused container.
This commit is contained in:
Dan Elkouby
2018-05-05 13:30:48 +03:00
parent d302af2312
commit 94bc401680
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);