]> Dogcows Code - chaz/openbox/blobdiff - src/GCCache.hh
Fix small compile error on g++3.
[chaz/openbox] / src / GCCache.hh
index 56f234a3eb0c42cc0cea873af3202be6cc4fbfc4..614eac1df4a658a69c592ec11c6331f99fb4d79d 100644 (file)
@@ -36,7 +36,7 @@ class BGCCacheItem;
 class BGCCacheContext {
 public:
   void set(const BColor &_color, const XFontStruct * const _font,
-           const int _function, const int _subwindow);
+           const int _function, const int _subwindow, const int _linewidth);
   void set(const XFontStruct * const _font);
 
   ~BGCCacheContext(void);
@@ -44,7 +44,7 @@ public:
 private:
   BGCCacheContext(const BaseDisplay * const _display)
     : display(_display), gc(0), pixel(0ul), fontid(0ul),
-      function(0), subwindow(0), used(false), screen(~(0u)) {}
+      function(0), subwindow(0), used(false), screen(~(0u)), linewidth(0) {}
 
   const BaseDisplay *display;
   GC gc;
@@ -54,6 +54,7 @@ private:
   int subwindow;
   bool used;
   unsigned int screen;
+  int linewidth;
 
   BGCCacheContext(const BGCCacheContext &_nocopy);
   BGCCacheContext &operator=(const BGCCacheContext &_nocopy);
@@ -82,14 +83,15 @@ private:
 
 class BGCCache {
 public:
-  explicit BGCCache(const BaseDisplay * const _display);
+  BGCCache(const BaseDisplay * const _display, unsigned int screen_count);
   ~BGCCache(void);
 
   // cleans up the cache
   void purge(void);
 
   BGCCacheItem *find(const BColor &_color, const XFontStruct * const _font = 0,
-                     int _function = GXcopy, int _subwindow = ClipByChildren);
+                     int _function = GXcopy, int _subwindow = ClipByChildren,
+                     int _linewidth = 0);
   void release(BGCCacheItem *_item);
 
 private:
@@ -111,19 +113,23 @@ private:
 class BPen {
 public:
   inline BPen(const BColor &_color,  const XFontStruct * const _font = 0,
-              int _function = GXcopy, int _subwindow = ClipByChildren)
-    : color(_color), font(_font), function(_function), subwindow(_subwindow),
-      cache(_color.display()->gcCache()), item(0) { }
+              int _linewidth = 0, int _function = GXcopy,
+              int _subwindow = ClipByChildren)
+    : color(_color), font(_font), linewidth(_linewidth), function(_function),
+      subwindow(_subwindow), cache(_color.display()->gcCache()), item(0) { }
+
   inline ~BPen(void) { if (item) cache->release(item); }
 
   inline const GC &gc(void) const {
-    if (! item) item = cache->find(color, font, function, subwindow);
+    if (! item) item = cache->find(color, font, function, subwindow,
+                                   linewidth);
     return item->gc();
   }
 
 private:
   const BColor &color;
   const XFontStruct *font;
+  int linewidth;
   int function;
   int subwindow;
 
This page took 0.026325 seconds and 4 git commands to generate.