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/output.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sway/output.c') diff --git a/sway/output.c b/sway/output.c index d56a2f30..97b8a4a6 100644 --- a/sway/output.c +++ b/sway/output.c @@ -5,6 +5,13 @@ #include "log.h" #include "list.h" +void output_get_scaled_size(wlc_handle handle, struct wlc_size *size) { + *size = *wlc_output_get_resolution(handle); + uint32_t scale = wlc_output_get_scale(handle); + size->w /= scale; + size->h /= scale; +} + swayc_t *output_by_name(const char* name, const struct wlc_point *abs_pos) { if (strcasecmp(name, "left") == 0) { return swayc_adjacent_output(NULL, MOVE_LEFT, abs_pos, true); -- cgit v1.2.3