From: John Lindgren Date: Mon, 8 Jul 2024 14:56:20 +0000 (-0400) Subject: theme: fix memory leak of button icons X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=5979cc137a06e218c33d4e88ef484e9761264caf;p=proto%2Flabwc.git theme: fix memory leak of button icons --- diff --git a/src/theme.c b/src/theme.c index 904aeadf..248a352a 100644 --- a/src/theme.c +++ b/src/theme.c @@ -1397,10 +1397,35 @@ theme_init(struct theme *theme, struct server *server, const char *theme_name) void theme_finish(struct theme *theme) { + zdrop(&theme->button_close_active_unpressed); + zdrop(&theme->button_maximize_active_unpressed); + zdrop(&theme->button_restore_active_unpressed); + zdrop(&theme->button_iconify_active_unpressed); + zdrop(&theme->button_menu_active_unpressed); + + zdrop(&theme->button_close_inactive_unpressed); + zdrop(&theme->button_maximize_inactive_unpressed); + zdrop(&theme->button_restore_inactive_unpressed); + zdrop(&theme->button_iconify_inactive_unpressed); + zdrop(&theme->button_menu_inactive_unpressed); + + zdrop(&theme->button_close_active_hover); + zdrop(&theme->button_maximize_active_hover); + zdrop(&theme->button_restore_active_hover); + zdrop(&theme->button_iconify_active_hover); + zdrop(&theme->button_menu_active_hover); + + zdrop(&theme->button_close_inactive_hover); + zdrop(&theme->button_maximize_inactive_hover); + zdrop(&theme->button_restore_inactive_hover); + zdrop(&theme->button_iconify_inactive_hover); + zdrop(&theme->button_menu_inactive_hover); + zdrop(&theme->corner_top_left_active_normal); zdrop(&theme->corner_top_left_inactive_normal); zdrop(&theme->corner_top_right_active_normal); zdrop(&theme->corner_top_right_inactive_normal); + zdrop(&theme->shadow_corner_top_active); zdrop(&theme->shadow_corner_bottom_active); zdrop(&theme->shadow_edge_active);