X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Ftruerendercontrol.cc;h=2f1b710e1a7ef92416cd157baa5ee19bca2656a2;hb=01a37dfe1888f1ac6da7ab12c6e4d59ce104d12c;hp=1d5b8dc44bc37b3e327a699e3fda5a89c54aebaa;hpb=ec2113ca5bbb6043fafab0623f24e991e052f77e;p=chaz%2Fopenbox diff --git a/otk/truerendercontrol.cc b/otk/truerendercontrol.cc index 1d5b8dc4..2f1b710e 100644 --- a/otk/truerendercontrol.cc +++ b/otk/truerendercontrol.cc @@ -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; + } +} + }