aboutsummaryrefslogtreecommitdiffstats
path: root/sway/config
diff options
context:
space:
mode:
authorLibravatar emersion <contact@emersion.fr>2017-12-09 15:48:52 +0100
committerLibravatar emersion <contact@emersion.fr>2017-12-09 15:48:52 +0100
commit4a14aa9ad99a6f316024e110332a0b482e231543 (patch)
tree2340e6dbc5ffd05c4e2c239d316b42482a474315 /sway/config
parentAdd new_output_config, update root container size on output hotplug (diff)
downloadsway-4a14aa9ad99a6f316024e110332a0b482e231543.tar.gz
sway-4a14aa9ad99a6f316024e110332a0b482e231543.tar.zst
sway-4a14aa9ad99a6f316024e110332a0b482e231543.zip
Remove output from layout
Diffstat (limited to 'sway/config')
-rw-r--r--sway/config/output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/config/output.c b/sway/config/output.c
index 26798503..027a79ce 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -91,12 +91,13 @@ static void set_mode(struct wlr_output *output, int width, int height,
91void apply_output_config(struct output_config *oc, swayc_t *output) { 91void apply_output_config(struct output_config *oc, swayc_t *output) {
92 assert(output->type == C_OUTPUT); 92 assert(output->type == C_OUTPUT);
93 93
94 struct wlr_output *wlr_output = output->sway_output->wlr_output;
94 if (oc && oc->enabled == 0) { 95 if (oc && oc->enabled == 0) {
96 wlr_output_layout_remove(root_container.output_layout, wlr_output);
95 destroy_output(output); 97 destroy_output(output);
96 return; 98 return;
97 } 99 }
98 100
99 struct wlr_output *wlr_output = output->sway_output->wlr_output;
100 if (oc && oc->width > 0 && oc->height > 0) { 101 if (oc && oc->width > 0 && oc->height > 0) {
101 set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate); 102 set_mode(wlr_output, oc->width, oc->height, oc->refresh_rate);
102 } 103 }