all repos — tint2 @ 21e9303502de9aa612dac08d65763217b3f8a5a7

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

Fix regression caused by imlib leak (related: issue #704)
Chris Lee @klee93
commit

21e9303502de9aa612dac08d65763217b3f8a5a7

parent

94d4a219ee237409384808a4de56bbc282b83f25

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

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

@@ -788,11 +788,15 @@

Imlib_Image load_image(const char *path, int cached) { 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); if (!image && g_str_has_suffix(path, ".svg")) { char tmp_filename[128]; - snprintf(tmp_filename, sizeof(tmp_filename), "/tmp/tint2-%d.png", (int)getpid()); + snprintf(tmp_filename, sizeof(tmp_filename), "/tmp/tint2-%d-%lu.png", (int)getpid(), counter); + counter++; int fd = open(tmp_filename, O_CREAT | O_EXCL, 0600); if (fd >= 0) { // We fork here because librsvg allocates memory like crazy