From 6ea02f3064736b7f53e5b28c16ee74f5665ce1b8 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 16 Jul 2016 10:04:18 -0400 Subject: Initial pass on HiDPI support --- sway/config.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sway/config.c') diff --git a/sway/config.c b/sway/config.c index 5e1887a6..83129524 100644 --- a/sway/config.c +++ b/sway/config.c @@ -867,6 +867,9 @@ void apply_output_config(struct output_config *oc, swayc_t *output) { struct wlc_size new_size = { .w = oc->width, .h = oc->height }; wlc_output_set_resolution(output->handle, &new_size); } + if (oc && oc->scale != 1) { + wlc_output_set_scale(output->handle, (int32_t)oc->scale); + } // Find position for it if (oc && oc->x != -1 && oc->y != -1) { -- cgit v1.2.3 From 11e7ca044c61f0bcce95a90b50814f780f769f21 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 18 Jul 2016 16:21:45 -0400 Subject: Update hidpi support to latest wlc API --- sway/config.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sway/config.c') diff --git a/sway/config.c b/sway/config.c index 83129524..25566213 100644 --- a/sway/config.c +++ b/sway/config.c @@ -863,12 +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); - } - if (oc && oc->scale != 1) { - wlc_output_set_scale(output->handle, (int32_t)oc->scale); + 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 -- cgit v1.2.3