From f509008cb957802b953779647a5c6506da410424 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Wed, 14 Feb 2024 23:30:05 +0000 Subject: [PATCH] win: don't call win_on_factor_change in win_update_bounding_shape Later in win_process_update_flags, we check for WIN_FLAGS_FACTOR_CHANGED and will call win_on_factor_change if needed. So in win_update_bounding_shape we just need to set that flag. Otherwise we call win_on_factor_change multiple times unnecessarily. Signed-off-by: Yuxuan Shui --- src/win.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/win.c b/src/win.c index aafbe024..76f085d4 100644 --- a/src/win.c +++ b/src/win.c @@ -2046,14 +2046,12 @@ void win_update_bounding_shape(session_t *ps, struct managed_win *w) { // Window shape changed, we should free old wpaint and shadow pict // log_trace("free out dated pict"); - win_set_flags(w, WIN_FLAGS_IMAGES_STALE); + win_set_flags(w, WIN_FLAGS_IMAGES_STALE | WIN_FLAGS_FACTOR_CHANGED); win_release_mask(ps->backend_data, w); ps->pending_updates = true; free_paint(ps, &w->paint); free_paint(ps, &w->shadow_paint); - - win_on_factor_change(ps, w); } /**