From 2f8a6285b2f3e3ecf599bda2e04ce12487abc162 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Wed, 26 Feb 2025 17:33:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E7=BC=A9=E6=94=BE=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client.h | 7 +++++++ maomao.c | 1 + 2 files changed, 8 insertions(+) diff --git a/client.h b/client.h index ca5fbd6c..43e901d5 100644 --- a/client.h +++ b/client.h @@ -313,6 +313,13 @@ static inline void 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) { #ifdef XWAYLAND diff --git a/maomao.c b/maomao.c index a21289d8..7e17bdd9 100644 --- a/maomao.c +++ b/maomao.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include