X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk_c%2Fgccache.c;h=85ab9f9e4bf9fe8dfaa4651198e0f5feae61d2b4;hb=7ec03b895e746bcf165dacd9141b981bd762cc2d;hp=f8b40f31e6d6fdfe148d2fa18de9287bbaa69e34;hpb=cca7a6762d273815947bd5c7cc58ab6713693e8e;p=chaz%2Fopenbox diff --git a/otk_c/gccache.c b/otk_c/gccache.c index f8b40f31..85ab9f9e 100644 --- a/otk_c/gccache.c +++ b/otk_c/gccache.c @@ -1,4 +1,4 @@ -// -*- mode: C; indent-tabs-mode: nil; -*- +// -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 2; -*- #include "../config.h" #include "gccache.h" @@ -40,7 +40,7 @@ void OtkGCCacheContext_Set(OtkGCCacheContext *self, XGCValues gcv; unsigned long mask; - self->pixel = gcv.foreground = OtkColor_Pixel(color); + self->pixel = gcv.foreground = color->pixel; self->function = gcv.function = function; self->subwindow = gcv.subwindow_mode = subwindow; self->linewidth = gcv.line_width = linewidth; @@ -156,7 +156,7 @@ static void OtkGCCache_InternalRelease(OtkGCCacheContext *ctx) OtkGCCacheItem *OtkGCCache_Find(OtkColor *color, XFontStruct *font, int function, int subwindow, int linewidth) { - const unsigned long pixel = OtkColor_Pixel(color); + const unsigned long pixel = color->pixel; const int screen = color->screen; const int key = color->red ^ color->green ^ color->blue; int k = (key % gccache->cache_size) * gccache->cache_buckets;