all repos — fluxbox @ fe0eda27bd192c3d5e108372c31b495401a94103

custom fork of the fluxbox windowmanager

bugfix: use the imlib cache for every imlib context used

calling imlib_set_cache_size() before a context is created by fluxbox creates
an 'unknown' context. that one is never freed at shutdown.
Mathias Gumz akira at fluxbox dot org
commit

fe0eda27bd192c3d5e108372c31b495401a94103

parent

a545ddef177c6bcd75d2e006838687a35393fcce

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

jump to
M src/FbTk/ImageImlib2.ccsrc/FbTk/ImageImlib2.cc

@@ -53,10 +53,6 @@ namespace FbTk {

ImageImlib2::ImageImlib2() { - // lets have a 2mb cache inside imlib, holds - // uncompressed images - imlib_set_cache_size(2048 * 1024); - // TODO: this are the potential candidates, // choose only sane ones. open for discussion static const char* format_list[] = {

@@ -90,11 +86,15 @@ if (screen_context == contexts.end()) {

Imlib_Context new_context = imlib_context_new(); imlib_context_push(new_context); - + imlib_context_set_display(dpy); imlib_context_set_visual(DefaultVisual(dpy, screen_num)); imlib_context_set_colormap(DefaultColormap(dpy, screen_num)); imlib_context_set_drawable(RootWindow(dpy, screen_num)); + + // lets have a 2mb cache inside imlib, holds + // uncompressed images + imlib_set_cache_size(2048 * 1024); imlib_context_pop();