Merge branch 'fix-focus'
This commit is contained in:
commit
11ab7cf32a
|
@ -220,12 +220,13 @@ bool tree_close(Con *con, kill_window_t kill_window, bool dont_kill_parent) {
|
||||||
if (was_mapped || con == focused) {
|
if (was_mapped || con == focused) {
|
||||||
if ((kill_window != DONT_KILL_WINDOW) || !dont_kill_parent || con == focused) {
|
if ((kill_window != DONT_KILL_WINDOW) || !dont_kill_parent || con == focused) {
|
||||||
DLOG("focusing %p / %s\n", next, next->name);
|
DLOG("focusing %p / %s\n", next, next->name);
|
||||||
/* TODO: check if the container (or one of its children) was focused */
|
|
||||||
if (next->type == CT_DOCKAREA) {
|
if (next->type == CT_DOCKAREA) {
|
||||||
/* Instead of focusing the dockarea, we need to restore focus to the workspace */
|
/* Instead of focusing the dockarea, we need to restore focus to the workspace */
|
||||||
con_focus(con_descend_focused(output_get_content(next->parent)));
|
con_focus(con_descend_focused(output_get_content(next->parent)));
|
||||||
} else {
|
} else {
|
||||||
con_focus(next);
|
if (con != focused)
|
||||||
|
DLOG("not changing focus, the container was not focused before\n");
|
||||||
|
else con_focus(next);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue