From bd9f49b963fe9868e1228e845eeb7507fc43adb9 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Mon, 18 May 2020 23:22:05 -0700 Subject: [PATCH] Added wofi_get_window_scale() --- inc/wofi_api.h | 2 ++ src/wofi.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/inc/wofi_api.h b/inc/wofi_api.h index 372d2a5..eced395 100644 --- a/inc/wofi_api.h +++ b/inc/wofi_api.h @@ -50,6 +50,8 @@ bool wofi_allow_markup(void); uint64_t wofi_get_image_size(void); +uint64_t wofi_get_window_scale(void); + bool wofi_mod_shift(void); bool wofi_mod_control(void); diff --git a/src/wofi.c b/src/wofi.c index 6ee84a8..45803d6 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -805,6 +805,10 @@ uint64_t wofi_get_image_size(void) { return image_size; } +uint64_t wofi_get_window_scale(void) { + return gdk_window_get_scale_factor(gtk_widget_get_window(window)); +} + bool wofi_mod_shift(void) { return mod_shift; }