X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FTexture.cc;h=75283a918c7c9113fa6f814274bfd2609fec0e86;hb=2037631f753753a5c1ee9b2475b55658c3bb6eea;hp=8f2731b6deb37f0ed3f19653479d8e28cd40e20d;hpb=01096f867493aed2efc2694c986811404288c1f1;p=chaz%2Fopenbox diff --git a/src/Texture.cc b/src/Texture.cc index 8f2731b6..75283a91 100644 --- a/src/Texture.cc +++ b/src/Texture.cc @@ -46,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); } @@ -133,7 +133,10 @@ void BTexture::setDescription(const string &d) { 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 @@ -158,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); } @@ -166,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; @@ -179,6 +184,7 @@ BTexture& BTexture::operator=(const BTexture &tt) { Pixmap BTexture::render(const unsigned int width, const unsigned int height, const Pixmap old) { assert(display() != 0); + assert(texture() != BTexture::NoTexture); if (texture() == (BTexture::Flat | BTexture::Solid)) return None;