From 2b6504d310ae9265fd0dbcc1aa3d02f28378969b Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 31 Oct 2011 12:11:34 +0000 Subject: [PATCH] Bugfix: RandR: Correctly keep focus on the focused workspace when an output disappears (Thanks AlexanderB, xeen) --- src/randr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- 2.39.5