X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Frendercontrol.cc;h=aae6c76bfa3a01f02b3c82f06c3f15f74de8c6e3;hb=9e6b0d5a8d0226232802bdece77665b167f98dae;hp=1bb59c80cf7e2099c24e9240acca1ca8aa2d2c4e;hpb=11f59d7925068357e24ca743c23019f671e6a5d7;p=chaz%2Fopenbox diff --git a/otk/rendercontrol.cc b/otk/rendercontrol.cc index 1bb59c80..aae6c76b 100644 --- a/otk/rendercontrol.cc +++ b/otk/rendercontrol.cc @@ -6,6 +6,7 @@ #include "rendercontrol.hh" #include "truerendercontrol.hh" +#include "pseudorendercontrol.hh" #include "rendertexture.hh" #include "rendercolor.hh" #include "display.hh" @@ -19,7 +20,7 @@ extern "C" { # include #endif // HAVE_STDLIB_H -#include "gettext.h" +#include "../src/gettext.h" #define _(str) gettext(str) } @@ -34,10 +35,10 @@ RenderControl *RenderControl::getRenderControl(int screen) return new TrueRenderControl(screen); case PseudoColor: case StaticColor: -// return new PseudoRenderControl(screen); + return new PseudoRenderControl(screen); case GrayScale: case StaticGray: -// return new GrayRenderControl(screen); + return new PseudoRenderControl(screen); default: printf(_("RenderControl: Unsupported visual %d specified. Aborting.\n"), vclass); @@ -60,6 +61,13 @@ RenderControl::~RenderControl() } +void RenderControl::drawRoot(const RenderColor &color) const +{ + Window root = display->screenInfo(_screen)->rootWindow(); + XSetWindowBackground(**display, root, color.pixel()); + XClearWindow(**display, root); +} + void RenderControl::drawString(Surface& sf, const Font &font, int x, int y, const RenderColor &color, const ustring &string) const @@ -99,7 +107,6 @@ void RenderControl::drawString(Surface& sf, const Font &font, int x, int y, else XftDrawString8(d, &c, font._xftfont, x, font._xftfont->ascent + y, (FcChar8*)string.c_str(), string.bytes()); - printf("DRAW A STRING!: %s\n", string.c_str()); return; }