- if (self->hasicon) {
- if (iconw < 1) iconw = 1; /* sanity check for crashes */
- if (self->draw_icon)
- self->draw_icon(l + ob_rr_theme->padding, t + ob_rr_theme->padding,
- iconw, texth, self->draw_icon_data);
+ x=MAX(MIN(x, area->x+area->width-w),area->x);
+ y=MAX(MIN(y, area->y+area->height-h),area->y);
+
+ g_free(area);
+ }
+
+ /* set the windows/appearances up */
+ 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 (self->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);