all repos — openbox @ 82438c21ec72d43167687a7355309d41fdcbcc73

openbox fork - make it a bit more like ryudo

add resize corners to the bottom corners of the inner client border
Dana Jansens danakj@orodu.net
commit

82438c21ec72d43167687a7355309d41fdcbcc73

parent

f94fe1b84749ff876dbb6643379dc3db5ad8941a

3 files changed, 69 insertions(+), 2 deletions(-)

jump to
M openbox/frame.copenbox/frame.c

@@ -130,6 +130,11 @@ 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->innerblb = createWindow(self->innerbottom, NULL, mask, &attrib); + self->innerbrb = createWindow(self->innerbottom, NULL, mask, &attrib); + self->innerbll = createWindow(self->innerleft, NULL, mask, &attrib); + self->innerbrr = createWindow(self->innerright, 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);

@@ -388,6 +393,9 @@

/* position/size and map/unmap all the windows */ if (!fake) { + gint innercornerheight = + ob_rr_theme->grip_width - self->size.bottom; + if (self->cbwidth_l) { XMoveResizeWindow(ob_display, self->innerleft, self->size.left - self->cbwidth_l,

@@ -398,6 +406,19 @@ XMapWindow(ob_display, self->innerleft);

} else XUnmapWindow(ob_display, self->innerleft); + if (self->cbwidth_l && innercornerheight > 0) { + XMoveResizeWindow(ob_display, self->innerbll, + 0, + self->client->area.height - + (ob_rr_theme->grip_width - + self->size.bottom), + self->cbwidth_l, + ob_rr_theme->grip_width - self->size.bottom); + + XMapWindow(ob_display, self->innerbll); + } else + XUnmapWindow(ob_display, self->innerbll); + if (self->cbwidth_r) { XMoveResizeWindow(ob_display, self->innerright, self->size.left + self->client->area.width,

@@ -408,6 +429,19 @@ XMapWindow(ob_display, self->innerright);

} else XUnmapWindow(ob_display, self->innerright); + if (self->cbwidth_r && innercornerheight > 0) { + XMoveResizeWindow(ob_display, self->innerbrr, + 0, + self->client->area.height - + (ob_rr_theme->grip_width - + self->size.bottom), + self->cbwidth_r, + ob_rr_theme->grip_width - self->size.bottom); + + XMapWindow(ob_display, self->innerbrr); + } else + XUnmapWindow(ob_display, self->innerbrr); + if (self->cbwidth_t) { XMoveResizeWindow(ob_display, self->innertop, self->size.left - self->cbwidth_l,

@@ -428,9 +462,26 @@ self->client->area.width +

self->cbwidth_l + self->cbwidth_r, self->cbwidth_b); + XMoveResizeWindow(ob_display, self->innerblb, + 0, 0, + ob_rr_theme->grip_width + self->bwidth, + self->cbwidth_b); + XMoveResizeWindow(ob_display, self->innerbrb, + self->client->area.width + + self->cbwidth_l + self->cbwidth_r - + (ob_rr_theme->grip_width + self->bwidth), + 0, + ob_rr_theme->grip_width + self->bwidth, + self->cbwidth_b); + XMapWindow(ob_display, self->innerbottom); - } else + XMapWindow(ob_display, self->innerblb); + XMapWindow(ob_display, self->innerbrb); + } else { XUnmapWindow(ob_display, self->innerbottom); + XUnmapWindow(ob_display, self->innerblb); + XUnmapWindow(ob_display, self->innerbrb); + } if (self->bwidth) { gint titlesides;

@@ -598,7 +649,7 @@ 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 - sidebwidth - + self->size.right - self->bwidth - sidebwidth- ob_rr_theme->grip_width, self->size.top + self->client->area.height + self->size.bottom - self->bwidth,

@@ -876,12 +927,16 @@ XChangeWindowAttributes(ob_display, self->handleleft, CWCursor, &a);

XChangeWindowAttributes(ob_display, self->lgripleft, CWCursor, &a); XChangeWindowAttributes(ob_display, self->lgriptop, CWCursor, &a); XChangeWindowAttributes(ob_display, self->lgripbottom, CWCursor, &a); + XChangeWindowAttributes(ob_display, self->innerbll, CWCursor, &a); + XChangeWindowAttributes(ob_display, self->innerblb, CWCursor, &a); a.cursor = ob_cursor(r ? OB_CURSOR_SOUTHEAST : OB_CURSOR_NONE); XChangeWindowAttributes(ob_display, self->rgrip, CWCursor, &a); XChangeWindowAttributes(ob_display, self->handleright, CWCursor, &a); XChangeWindowAttributes(ob_display, self->rgripright, CWCursor, &a); XChangeWindowAttributes(ob_display, self->rgriptop, CWCursor, &a); XChangeWindowAttributes(ob_display, self->rgripbottom, CWCursor, &a); + XChangeWindowAttributes(ob_display, self->innerbrr, CWCursor, &a); + XChangeWindowAttributes(ob_display, self->innerbrb, CWCursor, &a); } }
M openbox/frame.hopenbox/frame.h

@@ -120,6 +120,10 @@ Window innerleft; /*!< For drawing the inner client border */

Window innertop; /*!< For drawing the inner client border */ Window innerright; /*!< For drawing the inner client border */ Window innerbottom; /*!< For drawing the inner client border */ + Window innerblb; + Window innerbll; + Window innerbrb; + Window innerbrr; Window backback; /*!< A colored window shown while resizing */ Window backfront; /*!< An undrawn-in window, to prevent flashing on unmap */
M openbox/framerender.copenbox/framerender.c

@@ -59,6 +59,14 @@ XSetWindowBackground(ob_display, self->innerright, px);

XClearWindow(ob_display, self->innerright); XSetWindowBackground(ob_display, self->innerbottom, px); XClearWindow(ob_display, self->innerbottom); + XSetWindowBackground(ob_display, self->innerbll, px); + XClearWindow(ob_display, self->innerbll); + XSetWindowBackground(ob_display, self->innerbrr, px); + XClearWindow(ob_display, self->innerbrr); + XSetWindowBackground(ob_display, self->innerblb, px); + XClearWindow(ob_display, self->innerblb); + XSetWindowBackground(ob_display, self->innerbrb, px); + XClearWindow(ob_display, self->innerbrb); px = (self->focused ? RrColorPixel(ob_rr_theme->frame_focused_border_color) :