diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-04-04 00:20:44 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-04-04 00:20:44 -0400 |
commit | 741e3959e30283f5f699f7e9fa6620e3578b9c76 (patch) | |
tree | 8489f010c2f3e112722e7b999bacef18dfe418ef /sway/config | |
parent | simplify container close (diff) | |
parent | Merge pull request #1722 from swaywm/swaybar-hidpi (diff) | |
download | sway-741e3959e30283f5f699f7e9fa6620e3578b9c76.tar.gz sway-741e3959e30283f5f699f7e9fa6620e3578b9c76.tar.zst sway-741e3959e30283f5f699f7e9fa6620e3578b9c76.zip |
Merge branch 'wlroots' into split-containers2
Diffstat (limited to 'sway/config')
-rw-r--r-- | sway/config/output.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index c4b74ce2..1c298d37 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -123,11 +123,14 @@ void terminate_swaybg(pid_t pid) { | |||
123 | void apply_output_config(struct output_config *oc, struct sway_container *output) { | 123 | void apply_output_config(struct output_config *oc, struct sway_container *output) { |
124 | assert(output->type == C_OUTPUT); | 124 | assert(output->type == C_OUTPUT); |
125 | 125 | ||
126 | struct wlr_output_layout *output_layout = | ||
127 | root_container.sway_root->output_layout; | ||
126 | struct wlr_output *wlr_output = output->sway_output->wlr_output; | 128 | struct wlr_output *wlr_output = output->sway_output->wlr_output; |
129 | |||
127 | if (oc && oc->enabled == 0) { | 130 | if (oc && oc->enabled == 0) { |
131 | container_destroy(output); | ||
128 | wlr_output_layout_remove(root_container.sway_root->output_layout, | 132 | wlr_output_layout_remove(root_container.sway_root->output_layout, |
129 | wlr_output); | 133 | wlr_output); |
130 | container_destroy(output); | ||
131 | return; | 134 | return; |
132 | } | 135 | } |
133 | 136 | ||
@@ -148,11 +151,9 @@ void apply_output_config(struct output_config *oc, struct sway_container *output | |||
148 | // Find position for it | 151 | // Find position for it |
149 | if (oc && (oc->x != -1 || oc->y != -1)) { | 152 | if (oc && (oc->x != -1 || oc->y != -1)) { |
150 | wlr_log(L_DEBUG, "Set %s position to %d, %d", oc->name, oc->x, oc->y); | 153 | wlr_log(L_DEBUG, "Set %s position to %d, %d", oc->name, oc->x, oc->y); |
151 | wlr_output_layout_add(root_container.sway_root->output_layout, | 154 | wlr_output_layout_add(output_layout, wlr_output, oc->x, oc->y); |
152 | wlr_output, oc->x, oc->y); | ||
153 | } else { | 155 | } else { |
154 | wlr_output_layout_add_auto(root_container.sway_root->output_layout, | 156 | wlr_output_layout_add_auto(output_layout, wlr_output); |
155 | wlr_output); | ||
156 | } | 157 | } |
157 | 158 | ||
158 | if (!oc || !oc->background) { | 159 | if (!oc || !oc->background) { |