Merge pull request #3524 from orestisf1993/regress-randr

randr.c: Fix regression with focusing NULL container
This commit is contained in:
Ingo Bürk 2018-11-15 12:57:59 +01:00 committed by GitHub
commit 8ad84f06c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -974,10 +974,12 @@ void randr_disable_output(Output *output) {
} }
} }
/* Restore focus after con_detach / con_attach */ /* Restore focus after con_detach / con_attach. next can be NULL, see #3523. */
if (next) {
DLOG("now focusing next = %p\n", next); DLOG("now focusing next = %p\n", next);
con_focus(next); con_focus(next);
workspace_show(con_get_workspace(next)); workspace_show(con_get_workspace(next));
}
/* 3: move the dock clients to the first output */ /* 3: move the dock clients to the first output */
Con *child; Con *child;