all repos — openbox @ 2efea6f21cf1bdd69e339f2285b45a31dd68304a

openbox fork - make it a bit more like ryudo

remove the debug shit
Dana Jansens danakj@orodu.net
commit

2efea6f21cf1bdd69e339f2285b45a31dd68304a

parent

187e7db9c039d7369766aeae7dfdf87f191ac446

1 files changed, 0 insertions(+), 14 deletions(-)

jump to
M otk_c/color.cotk_c/color.c

@@ -86,7 +86,6 @@ self->blue = xcol.blue >> 8;

} } -#include <stdio.h> static void doCacheCleanup() { unsigned long *pixels; int i, ppos;

@@ -97,12 +96,9 @@

// ### TODO - support multiple displays! if (!PyDict_Size(colorcache)) return; // nothing to do - printf("Cleaning Cache...\n"); - pixels = malloc(sizeof(unsigned long) * PyDict_Size(colorcache)); for (i = 0; i < ScreenCount(OBDisplay->display); i++) { - printf("Screen %d\n", i); count = 0; ppos = 0;

@@ -110,19 +106,12 @@ while (PyDict_Next(colorcache, &ppos, &key, (PyObject**)&color)) {

// get the screen from the hash if (color->screen != i) continue; // wrong screen - printf("has %d refs\n", color->ob_refcnt); - // does someone other than the cache have a reference? (the cache gets 2) if (color->ob_refcnt > 2) continue; - printf("ppos: %d\n", ppos); - printf("Cleaning pixel: %lx Count: %d\n", color->pixel, count+1); - pixels[count++] = color->pixel; - printf("pixref references before: %d\n", color->ob_refcnt); PyDict_DelItem(colorcache, key); - printf("pixref references after: %d\n", color->ob_refcnt); --ppos; // back up one in the iteration }

@@ -130,7 +119,6 @@ if (count > 0)

XFreeColors(OBDisplay->display, OtkDisplay_ScreenInfo(OBDisplay, i)->colormap, pixels, count, 0); - printf("Done Cleaning Cache. Cleaned %d pixels\n", count); } free(pixels);

@@ -141,8 +129,6 @@ static void allocate(OtkColor *self) {

XColor xcol; assert(!self->allocated); - - printf("allocating! %d\n", cleancache); // allocate color from rgb values xcol.red = self->red | self->red << 8;