aboutsummaryrefslogtreecommitdiff
path: root/sway/output.c
diff options
context:
space:
mode:
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);