Changelog for Openbox:
2.2.4:
+ * Fixed a bug in the image cache that would draw (Scott Moynes)
+ borders incorrectly in rare circumstances.
+
* Draw window titles in the titlebars and toolbar with (Ben Jansens)
UTF encoding when they are set with the NETWM (UTF)
hints.
Pixmap pixmap;
unsigned int count, width, height;
- unsigned long pixel1, pixel2, texture;
+ unsigned long pixel1, pixel2, texture, borderColor;
};
BImageControl(BaseDisplay *dpy, const ScreenInfo *scrn,
Pixmap searchCache(const unsigned int width, const unsigned int height,
const unsigned long texture,
- const BColor &c1, const BColor &c2);
+ const BColor &c1, const BColor &c2,
+ const BColor &borderColor);
};
Pixmap BImageControl::searchCache(const unsigned int width,
const unsigned int height,
const unsigned long texture,
- const BColor &c1, const BColor &c2) {
+ const BColor &c1, const BColor &c2,
+ const BColor &bc) {
if (cache.empty())
return None;
CachedImage& tmp = *it;
if (tmp.width == width && tmp.height == height &&
tmp.texture == texture && tmp.pixel1 == c1.pixel())
- if (texture & BTexture::Gradient) {
- if (tmp.pixel2 == c2.pixel()) {
+ if (texture & BTexture::Gradient && tmp.pixel2 == c2.pixel()) {
+ if(texture & BTexture::Border && tmp.borderColor == bc.pixel()){
tmp.count++;
return tmp.pixmap;
}
+ } else if(texture & BTexture::Border && tmp.borderColor == bc.pixel()){
+ tmp.count++;
+ return tmp.pixmap;
} else {
tmp.count++;
return tmp.pixmap;
if (texture.texture() & BTexture::Parent_Relative) return ParentRelative;
Pixmap pixmap = searchCache(width, height, texture.texture(),
- texture.color(), texture.colorTo());
+ texture.color(), texture.colorTo(),
+ texture.borderColor());
if (pixmap) return pixmap;
BImage image(this, width, height);
else
tmp.pixel2 = 0l;
+ if (texture.texture() & BTexture::Border)
+ tmp.borderColor = texture.borderColor().pixel();
+ else
+ tmp.borderColor = 0l;
+
cache.push_back(tmp);
if (cache.size() > cache_max) {