aboutsummaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-07-29 07:35:43 -0400
committerDrew DeVault <sir@cmpwn.com>2016-07-29 07:35:43 -0400
commit966127222439620233c27ab835062f6cc69e23ea (patch)
tree7e233c68e7063b7c0c7857a73111e95141fb5b44 /sway/config.c
parentddb44984c5f3aede3eea45403659e5614a7b752f (diff)
parentcad085ed9ddf57ade3785cabfaea9fb49613d4a3 (diff)
Merge remote-tracking branch 'origin/hidpi'
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c7
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) {
output->width = oc->width;
output->height = oc->height;
- sway_log(L_DEBUG, "Set %s size to %ix%i", oc->name, oc->width, oc->height);
+ 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);
+ wlc_output_set_resolution(output->handle, &new_size, (uint32_t)oc->scale);
+ } else if (oc && oc->scale != 1) {
+ const struct wlc_size *new_size = wlc_output_get_resolution(output->handle);
+ wlc_output_set_resolution(output->handle, new_size, (uint32_t)oc->scale);
}
// Find position for it