all repos — tint2 @ 6b127f96612b2e97ad8234e25fd6f5e5f8e0133f

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Merge branch 'imlib-leak' into 'master'

Fix imlib image leak

Closes #704

See merge request o9000/tint2!39
Chris chrlee@protonmail.com
commit

6b127f96612b2e97ad8234e25fd6f5e5f8e0133f

parent

49e7f54d2fd3e3321f8abc42cd6076bea517732e

1 files changed, 2 insertions(+), 5 deletions(-)

jump to
M src/util/common.csrc/util/common.c

@@ -794,8 +794,8 @@ Imlib_Image image;

static unsigned long counter = 0; if (debug_icons) fprintf(stderr, "tint2: loading icon %s\n", path); -#ifdef HAVE_RSVG image = imlib_load_image(path); +#ifdef HAVE_RSVG if (!image && g_str_has_suffix(path, ".svg")) { char tmp_filename[128]; snprintf(tmp_filename, sizeof(tmp_filename), "/tmp/tint2-%d-%lu.png", (int)getpid(), counter);

@@ -825,11 +825,8 @@ image = imlib_load_image_immediately(tmp_filename);

unlink(tmp_filename); } } - } else + } #endif - { - image = imlib_load_image(path); - } imlib_context_set_image(image); imlib_image_set_changes_on_disk(); return image;