mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Update hidpi support to latest wlc API
This commit is contained in:
parent
6ea02f3064
commit
11e7ca044c
7 changed files with 22 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue