From 43016bdad80fcd2efe557a43e8db2345ead9b5f4 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Fri, 9 Aug 2024 22:05:04 -0600 Subject: introduce client_set_scale() --- client.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'client.h') diff --git a/client.h b/client.h index 81946db..9c2cff3 100644 --- a/client.h +++ b/client.h @@ -331,6 +331,12 @@ client_set_fullscreen(Client *c, int fullscreen) wlr_xdg_toplevel_set_fullscreen(c->surface.xdg->toplevel, fullscreen); } +static inline void +client_set_scale(struct wlr_surface *s, float scale) { + wlr_fractional_scale_v1_notify_scale(s, scale); + wlr_surface_set_preferred_buffer_scale(s, (int32_t)ceilf(scale)); +} + static inline uint32_t client_set_size(Client *c, uint32_t width, uint32_t height) { -- cgit v1.2.3