- control->drawBackground(*s, *(_client->focused() ?
- style->labelFocusBackground() :
- style->labelUnfocusBackground()));
+ const otk::RenderTexture *tx = (_client->focused() ?
+ style->labelFocusBackground() :
+ style->labelUnfocusBackground());
+ if (tx->parentRelative()) {
+ otk::pixel32 *dest = s->pixelData(), *src;
+ int w = _title_sur->size().width();
+
+ src = _title_sur->pixelData() + w * geom.bevel + geom.title_x;
+
+ // get the background under the label
+ int xd = s->size().width();
+ int yd = s->size().height();
+ for (int y = 0; y < yd; ++y, src += w - xd)
+ for (int x = 0; x < xd; ++x, ++dest, ++src)
+ *dest = *src;
+ control->drawImage(*s, 0, 0, 0); // no image but draw the new background
+ } else
+ control->drawBackground(*s, *tx);