diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-07-29 07:35:43 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-07-29 07:35:43 -0400 |
commit | 966127222439620233c27ab835062f6cc69e23ea (patch) | |
tree | 7e233c68e7063b7c0c7857a73111e95141fb5b44 /sway/config.c | |
parent | Merge pull request #802 from acrisci/feature/timestamp-log-messages (diff) | |
parent | Update IPC JSON responses for HiDPI setups (diff) | |
download | sway-4ab01e98832fa105c7c01f72f6a6d24994514a06.tar.gz sway-4ab01e98832fa105c7c01f72f6a6d24994514a06.tar.zst sway-4ab01e98832fa105c7c01f72f6a6d24994514a06.zip |
Merge remote-tracking branch 'origin/hidpi'0.9-rc2
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c index 5e1887a6..25566213 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -863,9 +863,12 @@ void apply_output_config(struct output_config *oc, swayc_t *output) { | |||
863 | output->width = oc->width; | 863 | output->width = oc->width; |
864 | output->height = oc->height; | 864 | output->height = oc->height; |
865 | 865 | ||
866 | sway_log(L_DEBUG, "Set %s size to %ix%i", oc->name, oc->width, oc->height); | 866 | sway_log(L_DEBUG, "Set %s size to %ix%i (%d)", oc->name, oc->width, oc->height, oc->scale); |
867 | struct wlc_size new_size = { .w = oc->width, .h = oc->height }; | 867 | struct wlc_size new_size = { .w = oc->width, .h = oc->height }; |
868 | wlc_output_set_resolution(output->handle, &new_size); | 868 | wlc_output_set_resolution(output->handle, &new_size, (uint32_t)oc->scale); |
869 | } else if (oc && oc->scale != 1) { | ||
870 | const struct wlc_size *new_size = wlc_output_get_resolution(output->handle); | ||
871 | wlc_output_set_resolution(output->handle, new_size, (uint32_t)oc->scale); | ||
869 | } | 872 | } |
870 | 873 | ||
871 | // Find position for it | 874 | // Find position for it |