mask |= CWEventMask;
attrib.event_mask = ELEMENT_EVENTMASK;
+ self->innerleft = createWindow(self->window, NULL, mask, &attrib);
+ self->innertop = createWindow(self->window, NULL, mask, &attrib);
+ self->innerright = createWindow(self->window, NULL, mask, &attrib);
+ self->innerbottom = createWindow(self->window, NULL, mask, &attrib);
+
self->title = createWindow(self->window, NULL, mask, &attrib);
self->titleleft = createWindow(self->window, NULL, mask, &attrib);
self->titletop = createWindow(self->window, NULL, mask, &attrib);
self->left = createWindow(self->window, NULL, mask, &attrib);
self->right = createWindow(self->window, NULL, mask, &attrib);
- self->innerleft = createWindow(self->window, NULL, mask, &attrib);
- self->innertop = createWindow(self->window, NULL, mask, &attrib);
- self->innerright = createWindow(self->window, NULL, mask, &attrib);
- self->innerbottom = createWindow(self->window, NULL, mask, &attrib);
-
self->label = createWindow(self->title, NULL, mask, &attrib);
self->max = createWindow(self->title, NULL, mask, &attrib);
self->close = createWindow(self->title, NULL, mask, &attrib);
if (self->max_horz) {
self->cbwidth_l = self->cbwidth_r = 0;
- self->width = self->client->area.width - self->bwidth * 2;
+ self->width = self->client->area.width;
if (self->max_vert)
self->cbwidth_b = 0;
} else
gint titlesides;
/* height of titleleft and titleright */
- titlesides = (!self->max_horz ?
- ob_rr_theme->grip_width :
- self->size.top - self->bwidth);
+ titlesides = (!self->max_horz ? ob_rr_theme->grip_width : 0);
XMoveResizeWindow(ob_display, self->titletop,
ob_rr_theme->grip_width + self->bwidth, 0,
if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
XMoveResizeWindow(ob_display, self->titlebottom,
- self->bwidth,
+ (self->max_horz ? 0 : self->bwidth),
ob_rr_theme->title_height + self->bwidth,
self->width,
self->bwidth);
if (self->decorations & OB_FRAME_DECOR_TITLEBAR) {
XMoveResizeWindow(ob_display, self->title,
- self->bwidth, self->bwidth,
+ (self->max_horz ? 0 : self->bwidth),
+ self->bwidth,
self->width, ob_rr_theme->title_height);
XMapWindow(ob_display, self->title);
layout_title(self);
if (!fake) {
+ gint sidebwidth = self->max_horz ? 0 : self->bwidth;
+
if (self->bwidth && self->size.bottom) {
XMoveResizeWindow(ob_display, self->handlebottom,
ob_rr_theme->grip_width +
- self->bwidth * 2,
+ self->bwidth + sidebwidth,
self->size.top + self->client->area.height +
self->size.bottom - self->bwidth,
self->width - (ob_rr_theme->grip_width +
- self->bwidth) * 2,
+ sidebwidth) * 2,
self->bwidth);
- XMoveResizeWindow(ob_display, self->lgripleft,
- 0,
- self->size.top + self->client->area.height +
- self->size.bottom -
- (!self->max_horz ?
- ob_rr_theme->grip_width :
- self->size.bottom - self->cbwidth_b),
- self->bwidth,
- (!self->max_horz ?
- ob_rr_theme->grip_width :
- self->size.bottom - self->cbwidth_b));
- XMoveResizeWindow(ob_display, self->rgripright,
- self->size.left + self->client->area.width +
- self->size.right - self->bwidth,
- self->size.top + self->client->area.height +
- self->size.bottom -
- (!self->max_horz ?
- ob_rr_theme->grip_width :
- self->size.bottom - self->cbwidth_b),
- self->bwidth,
- (!self->max_horz ?
- ob_rr_theme->grip_width :
- self->size.bottom - self->cbwidth_b));
+
+ if (sidebwidth) {
+ XMoveResizeWindow(ob_display, self->lgripleft,
+ 0,
+ self->size.top +
+ self->client->area.height +
+ self->size.bottom -
+ (!self->max_horz ?
+ ob_rr_theme->grip_width :
+ self->size.bottom - self->cbwidth_b),
+ self->bwidth,
+ (!self->max_horz ?
+ ob_rr_theme->grip_width :
+ self->size.bottom - self->cbwidth_b));
+ XMoveResizeWindow(ob_display, self->rgripright,
+ self->size.left +
+ self->client->area.width +
+ self->size.right - self->bwidth,
+ self->size.top +
+ self->client->area.height +
+ self->size.bottom -
+ (!self->max_horz ?
+ ob_rr_theme->grip_width :
+ self->size.bottom - self->cbwidth_b),
+ self->bwidth,
+ (!self->max_horz ?
+ ob_rr_theme->grip_width :
+ self->size.bottom - self->cbwidth_b));
+
+ XMapWindow(ob_display, self->lgripleft);
+ XMapWindow(ob_display, self->rgripright);
+ } else {
+ XUnmapWindow(ob_display, self->lgripleft);
+ XUnmapWindow(ob_display, self->rgripright);
+ }
XMoveResizeWindow(ob_display, self->lgripbottom,
- self->bwidth,
+ sidebwidth,
self->size.top + self->client->area.height +
self->size.bottom - self->bwidth,
ob_rr_theme->grip_width + self->bwidth,
self->bwidth);
XMoveResizeWindow(ob_display, self->rgripbottom,
self->size.left + self->client->area.width +
- self->size.right - self->bwidth * 2 -
+ self->size.right - self->bwidth - sidebwidth -
ob_rr_theme->grip_width,
self->size.top + self->client->area.height +
self->size.bottom - self->bwidth,
self->bwidth);
XMapWindow(ob_display, self->handlebottom);
- XMapWindow(ob_display, self->lgripleft);
- XMapWindow(ob_display, self->rgripright);
XMapWindow(ob_display, self->lgripbottom);
XMapWindow(ob_display, self->rgripbottom);
{
XMoveResizeWindow(ob_display, self->handletop,
ob_rr_theme->grip_width +
- self->bwidth * 2,
+ self->bwidth + sidebwidth,
FRAME_HANDLE_Y(self),
self->width - (ob_rr_theme->grip_width +
- self->bwidth) * 2,
+ sidebwidth) * 2,
self->bwidth);
XMapWindow(ob_display, self->handletop);
ob_rr_theme->handle_height);
XMoveResizeWindow(ob_display, self->lgriptop,
- self->bwidth,
+ sidebwidth,
FRAME_HANDLE_Y(self),
ob_rr_theme->grip_width +
self->bwidth,
XMoveResizeWindow(ob_display, self->rgriptop,
self->size.left +
self->client->area.width +
- self->size.right - self->bwidth * 2 -
- ob_rr_theme->grip_width,
+ self->size.right - self->bwidth -
+ sidebwidth - ob_rr_theme->grip_width,
FRAME_HANDLE_Y(self),
ob_rr_theme->grip_width +
self->bwidth,
ob_rr_theme->handle_height > 0)
{
XMoveResizeWindow(ob_display, self->handle,
- self->bwidth,
+ sidebwidth,
FRAME_HANDLE_Y(self) + self->bwidth,
self->width, ob_rr_theme->handle_height);
XMapWindow(ob_display, self->handle);