diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-10-14 21:39:39 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-10-16 21:03:54 -0400 |
commit | 8df33198eaaa06cf0914647aa945aff98071472b (patch) | |
tree | a1121b26b2a1030581ca327e4fdb96b64cae1e84 | |
parent | d3c2b5f95146d926577e069d6c5d8869e5b66dfe (diff) | |
download | sway-8df33198eaaa06cf0914647aa945aff98071472b.zip sway-8df33198eaaa06cf0914647aa945aff98071472b.tar.gz sway-8df33198eaaa06cf0914647aa945aff98071472b.tar.bz2 |
Merge pull request #1401 from sideshowdave7/config/add_scale_to_merge_output_config
Fixes to changing scale factor with output command
-rw-r--r-- | sway/config.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index 5b2b656..a33b8ed 100644 --- a/sway/config.c +++ b/sway/config.c @@ -912,6 +912,9 @@ void merge_output_config(struct output_config *dst, struct output_config *src) { if (src->y != -1) { dst->y = src->y; } + if (src->scale != -1) { + dst->scale = src->scale; + } if (src->background) { if (dst->background) { free(dst->background); @@ -1127,7 +1130,7 @@ void apply_output_config(struct output_config *oc, swayc_t *output) { sway_log(L_DEBUG, "Set %s size to %ix%i (%d)", oc->name, oc->width, oc->height, oc->scale); struct wlc_size new_size = { .w = oc->width, .h = oc->height }; wlc_output_set_resolution(output->handle, &new_size, (uint32_t)oc->scale); - } else if (oc && oc->scale != 1) { + } else if (oc) { const struct wlc_size *new_size = wlc_output_get_resolution(output->handle); wlc_output_set_resolution(output->handle, new_size, (uint32_t)oc->scale); } |