diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-03 21:33:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-03 21:33:59 -0400 |
commit | 7e2b0d731ba452a12e101f3b4c63086074ef345a (patch) | |
tree | 7e440e4ccdb5fdb11a802a029584979e42f73525 /sway/config/output.c | |
parent | deb63eda8845167de9cea42d17ed1d8e219f2168 (diff) | |
parent | f3ef1da750d8da4b68869fa98fb8eceb8dda9858 (diff) |
Merge pull request #1721 from emersion/fix-output-container-coords
Fix wrong output container coordinates
Diffstat (limited to 'sway/config/output.c')
-rw-r--r-- | sway/config/output.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index b4e56efa..6d832cbc 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -123,11 +123,13 @@ void terminate_swaybg(pid_t pid) { void apply_output_config(struct output_config *oc, struct sway_container *output) { assert(output->type == C_OUTPUT); + struct wlr_output_layout *output_layout = + root_container.sway_root->output_layout; struct wlr_output *wlr_output = output->sway_output->wlr_output; + if (oc && oc->enabled == 0) { - wlr_output_layout_remove(root_container.sway_root->output_layout, - wlr_output); container_output_destroy(output); + wlr_output_layout_remove(output_layout, wlr_output); return; } @@ -148,11 +150,9 @@ void apply_output_config(struct output_config *oc, struct sway_container *output // Find position for it if (oc && (oc->x != -1 || oc->y != -1)) { wlr_log(L_DEBUG, "Set %s position to %d, %d", oc->name, oc->x, oc->y); - wlr_output_layout_add(root_container.sway_root->output_layout, - wlr_output, oc->x, oc->y); + wlr_output_layout_add(output_layout, wlr_output, oc->x, oc->y); } else { - wlr_output_layout_add_auto(root_container.sway_root->output_layout, - wlr_output); + wlr_output_layout_add_auto(output_layout, wlr_output); } if (!oc || !oc->background) { |