From 7010644964a84666453cb8ddae1ee6e5b56562ed Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Fri, 17 Aug 2018 06:06:56 +0300 Subject: [PATCH 1/3] randr_query_outputs: con_activate -> workspace_show workspace_show will call x_set_warp_to if needed. Fixes #3333 --- src/randr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/randr.c b/src/randr.c index 38f1ee97..44071a53 100644 --- a/src/randr.c +++ b/src/randr.c @@ -946,7 +946,9 @@ void randr_query_outputs(void) { continue; DLOG("Focusing primary output %s\n", output_primary_name(output)); - con_activate(con_descend_focused(output->con)); + Con *content = output_get_content(output->con); + Con *ws = TAILQ_FIRST(&(content)->focus_head); + workspace_show(ws); } /* render_layout flushes */ From ba29290123762399a8497ac5c798a60e172c8a46 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Fri, 17 Aug 2018 06:45:20 +0300 Subject: [PATCH 2/3] Typo: output -> content --- src/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/output.c b/src/output.c index 571c01cf..19a7c4af 100644 --- a/src/output.c +++ b/src/output.c @@ -10,7 +10,7 @@ #include "all.h" /* - * Returns the output container below the given output container. + * Returns the content container below the given output container. * */ Con *output_get_content(Con *output) { From 789a09a6e73ff6c692fa04c36a4a27d2fc8359fd Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Fri, 17 Aug 2018 06:45:25 +0300 Subject: [PATCH 3/3] Use con_focus instead of con_activate for workspace --- src/randr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/randr.c b/src/randr.c index 44071a53..b1a9e8cb 100644 --- a/src/randr.c +++ b/src/randr.c @@ -517,7 +517,7 @@ void init_ws_for_output(Output *output, Con *content) { Con *ws = create_workspace_on_output(output, content); /* TODO: Set focus in main.c */ - con_activate(ws); + con_focus(ws); } /*