- XMoveResizeWindow(ob_display, self->bg, x, y, w, h);
-
- self->a_text->surface.parent = self->a_bg;
- self->a_text->surface.parentx = l + iconw +
- ob_rr_theme->paddingx * (self->hasicon ? 2 : 1);
- self->a_text->surface.parenty = t + ob_rr_theme->paddingy;
- XMoveResizeWindow(ob_display, self->text,
- l + iconw + ob_rr_theme->paddingx *
- (self->hasicon ? 2 : 1),
- t + ob_rr_theme->paddingy, textw, texth);
-
- RrPaint(self->a_bg, self->bg, w, h);
- RrPaint(self->a_text, self->text, textw, texth);
-
- if (self->hasicon) {
- if (iconw < 1) iconw = 1; /* sanity check for crashes */
- if (self->draw_icon)
- self->draw_icon(l + ob_rr_theme->paddingx,
- t + ob_rr_theme->paddingy,
- iconw, texth, self->draw_icon_data);
+ XMoveResizeWindow(obt_display, self->bg, x, y, w, h);
+ /* when there is no icon and the text is not parent relative, then
+ fill the whole dialog with the text appearance, don't use the bg at all
+ */
+ if (hasicon || self->a_text->surface.grad == RR_SURFACE_PARENTREL)
+ RrPaint(self->a_bg, self->bg, w, h);
+
+ if (textw) {
+ self->a_text->surface.parent = self->a_bg;
+ self->a_text->surface.parentx = textx;
+ self->a_text->surface.parenty = texty;
+ XMoveResizeWindow(obt_display, self->text, textx, texty, textw, texth);
+ RrPaint(self->a_text, self->text, textw, texth);