From 6eb8cc57513a8133783c53ce150cbd34b9cacfc5 Mon Sep 17 00:00:00 2001 From: sewn Date: Wed, 18 Jun 2025 17:26:59 +0300 Subject: [PATCH] ignore rescaling if the new scale is the same --- mew.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mew.c b/mew.c index fa6bab4..f10f8f3 100644 --- a/mew.c +++ b/mew.c @@ -803,14 +803,12 @@ static void surface_handle_preferred_scale(void *data, struct wl_surface *wl_surface, int32_t factor) { + if (scale == factor) + return; scale = factor; loadfonts(); - /* FIXME: - * Use a callback to ensure the 'configure' event - * is sent before the draw, which changes the dimensions - * properly for the update in scale. - */ + /* the scale of the surface is only known after an initial draw, not before :( */ zwlr_layer_surface_v1_set_size(layer_surface, 0, mh / scale); redraw(); }