diff options
Diffstat (limited to 'otk/truerendercontrol.cc')
| -rw-r--r-- | otk/truerendercontrol.cc | 10 |
1 files changed, 10 insertions, 0 deletions
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; + } +} + } |
