X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Frendercontrol.cc;h=8046398e304fa7dad3ca5cefeaed4ae44be20675;hb=ee356f4265d09a542d77474ac2f4b5057e7d04fe;hp=189bbd6e00514a3d2fd242adcf9c7595ff54b8eb;hpb=25f0151154c90b1c72f049e200d942fb2c18ddc5;p=chaz%2Fopenbox diff --git a/otk/rendercontrol.cc b/otk/rendercontrol.cc index 189bbd6e..8046398e 100644 --- a/otk/rendercontrol.cc +++ b/otk/rendercontrol.cc @@ -7,10 +7,10 @@ #include "rendercontrol.hh" #include "truerendercontrol.hh" #include "rendertexture.hh" +#include "rendercolor.hh" #include "display.hh" #include "screeninfo.hh" #include "surface.hh" -#include "color.hh" #include "font.hh" #include "ustring.hh" @@ -19,7 +19,7 @@ extern "C" { # include #endif // HAVE_STDLIB_H -#include "gettext.h" +#include "../src/gettext.h" #define _(str) gettext(str) } @@ -60,8 +60,16 @@ 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 Color &color, const ustring &string) const + const RenderColor &color, + const ustring &string) const { assert(sf._screen == _screen); XftDraw *d = sf._xftdraw; @@ -98,7 +106,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; }