]> Dogcows Code - chaz/openbox/blobdiff - otk/truerendercontrol.cc
allocate colors in pseudocolor from the map we allocate in the rendercontrol
[chaz/openbox] / otk / truerendercontrol.cc
index 1d5b8dc44bc37b3e327a699e3fda5a89c54aebaa..2f1b710e1a7ef92416cd157baa5ee19bca2656a2 100644 (file)
@@ -99,4 +99,14 @@ void TrueRenderControl::reduceDepth(Surface &sf, XImage *im) const
   }
 }
 
+void TrueRenderControl::allocateColor(XColor *color) const
+{
+  const ScreenInfo *info = display->screenInfo(_screen);
+  if (!XAllocColor(**display, info->colormap(), color)) {
+    fprintf(stderr, "TrueRenderControl: color alloc error: rgb:%x/%x/%x\n",
+            color->red & 0xff, color->green & 0xff, color->blue & 0xff);
+    color->pixel = 0;
+  }
+}
+
 }
This page took 0.026276 seconds and 4 git commands to generate.