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; }