X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Frendercontrol.cc;h=aae6c76bfa3a01f02b3c82f06c3f15f74de8c6e3;hb=9e6b0d5a8d0226232802bdece77665b167f98dae;hp=90229d88c7db765ff98398a9e82338ec583a6485;hpb=033e9843bcec8340c9e657fe0f0519f86075424b;p=chaz%2Fopenbox diff --git a/otk/rendercontrol.cc b/otk/rendercontrol.cc index 90229d88..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()); - return; }