From: Michael Stapelberg Date: Mon, 31 Oct 2011 12:11:34 +0000 (+0000) Subject: Bugfix: RandR: Correctly keep focus on the focused workspace when an output disappear... X-Git-Tag: 4.1~33 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2b6504d310ae9265fd0dbcc1aa3d02f28378969b;p=i3%2Fi3 Bugfix: RandR: Correctly keep focus on the focused workspace when an output disappears (Thanks AlexanderB, xeen) --- diff --git a/src/randr.c b/src/randr.c index ac61dd88..b8907b95 100644 --- a/src/randr.c +++ b/src/randr.c @@ -743,7 +743,7 @@ void randr_query_outputs() { Con *next = NULL; if (TAILQ_FIRST(&(croot->focus_head)) == output->con) { DLOG("This output (%p) was focused! Getting next\n", output->con); - next = con_next_focused(output->con); + next = focused; DLOG("next = %p\n", next); } @@ -763,6 +763,7 @@ void randr_query_outputs() { if (next) { DLOG("now focusing next = %p\n", next); con_focus(next); + workspace_show(con_get_workspace(next)); } /* 3: move the dock clients to the first output */