diff options
author | David Hurst <sideshowdave7@gmail.com> | 2017-10-14 15:58:12 -0700 |
---|---|---|
committer | David Hurst <sideshowdave7@gmail.com> | 2017-10-14 17:50:31 -0700 |
commit | ee15068a8f6056966794292e9023ef0b9de2f897 (patch) | |
tree | a1121b26b2a1030581ca327e4fdb96b64cae1e84 /sway/config.c | |
parent | Merge pull request #1398 from johalun/freebsd-fix (diff) | |
download | sway-ee15068a8f6056966794292e9023ef0b9de2f897.tar.gz sway-ee15068a8f6056966794292e9023ef0b9de2f897.tar.zst sway-ee15068a8f6056966794292e9023ef0b9de2f897.zip |
Add scale to merge_output_config
Diffstat (limited to 'sway/config.c')
-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 5b2b6569..a33b8edc 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) { | |||
912 | if (src->y != -1) { | 912 | if (src->y != -1) { |
913 | dst->y = src->y; | 913 | dst->y = src->y; |
914 | } | 914 | } |
915 | if (src->scale != -1) { | ||
916 | dst->scale = src->scale; | ||
917 | } | ||
915 | if (src->background) { | 918 | if (src->background) { |
916 | if (dst->background) { | 919 | if (dst->background) { |
917 | free(dst->background); | 920 | free(dst->background); |
@@ -1127,7 +1130,7 @@ void apply_output_config(struct output_config *oc, swayc_t *output) { | |||
1127 | sway_log(L_DEBUG, "Set %s size to %ix%i (%d)", oc->name, oc->width, oc->height, oc->scale); | 1130 | sway_log(L_DEBUG, "Set %s size to %ix%i (%d)", oc->name, oc->width, oc->height, oc->scale); |
1128 | struct wlc_size new_size = { .w = oc->width, .h = oc->height }; | 1131 | struct wlc_size new_size = { .w = oc->width, .h = oc->height }; |
1129 | wlc_output_set_resolution(output->handle, &new_size, (uint32_t)oc->scale); | 1132 | wlc_output_set_resolution(output->handle, &new_size, (uint32_t)oc->scale); |
1130 | } else if (oc && oc->scale != 1) { | 1133 | } else if (oc) { |
1131 | const struct wlc_size *new_size = wlc_output_get_resolution(output->handle); | 1134 | const struct wlc_size *new_size = wlc_output_get_resolution(output->handle); |
1132 | wlc_output_set_resolution(output->handle, new_size, (uint32_t)oc->scale); | 1135 | wlc_output_set_resolution(output->handle, new_size, (uint32_t)oc->scale); |
1133 | } | 1136 | } |