- self->bg = XCreateWindow(ob_display, ob_root,
+ self->bg = XCreateWindow(ob_display, RootWindow(ob_display, ob_screen),
0, 0, 1, 1, 0, RrDepth(ob_rr_inst),
InputOutput, RrVisual(ob_rr_inst),
CWOverrideRedirect, &attrib);
0, 0, 1, 1, 0, RrDepth(ob_rr_inst),
InputOutput, RrVisual(ob_rr_inst),
CWOverrideRedirect, &attrib);
self->a_text->texture[0].data.text.string = text;
RrMinsize(self->a_text, &textw, &texth);
self->a_text->texture[0].data.text.string = text;
RrMinsize(self->a_text, &textw, &texth);
XSetWindowBorderWidth(ob_display, self->bg, ob_rr_theme->bwidth);
XSetWindowBorder(ob_display, self->bg, ob_rr_theme->b_color->pixel);
XSetWindowBorderWidth(ob_display, self->bg, ob_rr_theme->bwidth);
XSetWindowBorder(ob_display, self->bg, ob_rr_theme->b_color->pixel);
/* measure the shit out */
RrMinsize(self->a_text, &textw, &texth);
/* measure the shit out */
RrMinsize(self->a_text, &textw, &texth);
XMoveResizeWindow(ob_display, self->bg, x, y, w, h);
self->a_text->surface.parent = self->a_bg;
XMoveResizeWindow(ob_display, self->bg, x, y, w, h);
self->a_text->surface.parent = self->a_bg;
- iconw + ob_rr_theme->bevel * (self->hasicon ? 2 : 1),
- ob_rr_theme->bevel, textw, texth);
+ l + iconw + ob_rr_theme->bevel * (self->hasicon ? 2 : 1),
+ t + ob_rr_theme->bevel, textw, texth);
- self->a_icon->surface.parentx = ob_rr_theme->bevel;
- self->a_icon->surface.parenty = ob_rr_theme->bevel;
+ self->a_icon->surface.parentx = l + ob_rr_theme->bevel;
+ self->a_icon->surface.parenty = t + ob_rr_theme->bevel;