aboutsummaryrefslogtreecommitdiff
path: root/sway/output.c
diff options
context:
space:
mode:
authorDrew DeVault <ddevault@linode.com>2016-07-18 16:21:45 -0400
committerDrew DeVault <ddevault@linode.com>2016-07-28 14:36:49 -0400
commit11e7ca044c61f0bcce95a90b50814f780f769f21 (patch)
tree70a4b6d6e476471a7f290f8c1278b01b275358be /sway/output.c
parent6ea02f3064736b7f53e5b28c16ee74f5665ce1b8 (diff)
Update hidpi support to latest wlc API
Diffstat (limited to 'sway/output.c')
-rw-r--r--sway/output.c7
1 files changed, 7 insertions, 0 deletions
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);