X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FTexture.cc;h=60923316701161459367818d0cc72d3a8fe07ce4;hb=6b1459e6f08d0759ed7b88f0748012d53962f2b3;hp=716522f6b159397cd69c0c173d8b97fb7f85b60b;hpb=8794d357e67abddf9fda9db77b235e294d0ec590;p=chaz%2Fopenbox diff --git a/src/Texture.cc b/src/Texture.cc index 716522f6..60923316 100644 --- a/src/Texture.cc +++ b/src/Texture.cc @@ -32,6 +32,8 @@ extern "C" { #endif } +#include + #include "Texture.hh" #include "BaseDisplay.hh" #include "Image.hh" @@ -44,14 +46,14 @@ using std::string; BTexture::BTexture(const BaseDisplay * const _display, unsigned int _screen, BImageControl* _ctrl) : c(_display, _screen), ct(_display, _screen), - lc(_display, _screen), sc(_display, _screen), t(0), + lc(_display, _screen), sc(_display, _screen), bc(_display, _screen), t(0), dpy(_display), ctrl(_ctrl), scrn(_screen) { } BTexture::BTexture(const string &d, const BaseDisplay * const _display, unsigned int _screen, BImageControl* _ctrl) : c(_display, _screen), ct(_display, _screen), - lc(_display, _screen), sc(_display, _screen), t(0), + lc(_display, _screen), sc(_display, _screen), bc(_display, _screen), t(0), dpy(_display), ctrl(_ctrl), scrn(_screen) { setDescription(d); } @@ -114,8 +116,6 @@ void BTexture::setDescription(const string &d) { addTexture(BTexture::PipeCross); else if (descr.find("elliptic") != string::npos) addTexture(BTexture::Elliptic); - else if (descr.find("diagonal") != string::npos) - addTexture(BTexture::Diagonal); else if (descr.find("horizontal") != string::npos) addTexture(BTexture::Horizontal); else if (descr.find("vertical") != string::npos) @@ -126,16 +126,17 @@ void BTexture::setDescription(const string &d) { addTexture(BTexture::Solid); } - if (descr.find("raised") != string::npos) - addTexture(BTexture::Raised); - else if (descr.find("sunken") != string::npos) + if (descr.find("sunken") != string::npos) addTexture(BTexture::Sunken); else if (descr.find("flat") != string::npos) addTexture(BTexture::Flat); else addTexture(BTexture::Raised); - if (! (texture() & BTexture::Flat)) { + if (texture() & BTexture::Flat) { + if (descr.find("border") != string::npos) + addTexture(BTexture::Border); + } else { if (descr.find("bevel2") != string::npos) addTexture(BTexture::Bevel2); else @@ -160,6 +161,7 @@ void BTexture::setDisplay(const BaseDisplay * const _display, ct.setDisplay(_display, _screen); lc.setDisplay(_display, _screen); sc.setDisplay(_display, _screen); + bc.setDisplay(_display, _screen); } @@ -168,6 +170,7 @@ BTexture& BTexture::operator=(const BTexture &tt) { ct = tt.ct; lc = tt.lc; sc = tt.sc; + bc = tt.bc; descr = tt.descr; t = tt.t; dpy = tt.dpy;