Introduction
Introduction Statistics Contact Development Disclaimer Help
tchanged border handling - dwm - [fork] customized build of dwm, the dynamic wi…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 464fc2cd18e82e6b1c169a5a7ce19f923d08d4e3
parent be8d6d40f60b45f941bd9cb6896b83ce223b6406
Author: Anselm R. Garbe <[email protected]>
Date: Tue, 17 Apr 2007 14:56:46 +0200
changed border handling
Diffstat:
M client.c | 9 ++-------
M event.c | 4 +---
M layout.c | 16 ++++++++--------
3 files changed, 11 insertions(+), 18 deletions(-)
---
diff --git a/client.c b/client.c
t@@ -185,13 +185,12 @@ manage(Window w, XWindowAttributes *wa) {
c->y = wa->y;
c->w = wa->width;
c->h = wa->height;
+ c->border = wa->border_width;
if(c->w == sw && c->h == sh) {
- c->border = 0;
c->x = sx;
c->y = sy;
}
else {
- c->border = BORDERPX;
if(c->x + c->w + 2 * c->border > wax + waw)
c->x = wax + waw - c->w - 2 * c->border;
if(c->y + c->h + 2 * c->border > way + wah)
t@@ -205,7 +204,7 @@ manage(Window w, XWindowAttributes *wa) {
XSelectInput(dpy, w,
StructureNotifyMask | PropertyChangeMask | EnterWindowMask);
grabbuttons(c, False);
- wc.border_width = c->border;
+ wc.border_width = BORDERPX;
XConfigureWindow(dpy, w, CWBorderWidth, &wc);
XSetWindowBorder(dpy, w, dc.norm[ColBorder]);
configure(c); /* propagates border_width, if size doesn't change */
t@@ -270,10 +269,6 @@ resize(Client *c, int x, int y, int w, int h, Bool sizehi…
}
if(w <= 0 || h <= 0)
return;
- if(w == sw && h == sh)
- c->border = 0;
- else
- c->border = BORDERPX;
/* offscreen appearance fixes */
if(x > sw)
x = sw - w - 2 * c->border;
diff --git a/event.c b/event.c
t@@ -191,10 +191,8 @@ configurerequest(XEvent *e) {
if(isvisible(c))
XMoveResizeWindow(dpy, c->win, c->x, c->y, c->…
}
- else {
+ else
configure(c);
- }
- c->border = BORDERPX;
}
else {
wc.x = ev->x;
diff --git a/layout.c b/layout.c
t@@ -38,18 +38,18 @@ tile(void) {
ny = way;
if(i < nmaster) {
ny += i * mh;
- nw = mw - 2 * BORDERPX;
- nh = mh - 2 * BORDERPX;
+ nw = mw - 2 * c->border;
+ nh = mh - 2 * c->border;
}
else { /* tile window */
nx += mw;
- nw = tw - 2 * BORDERPX;
- if(th > 2 * BORDERPX) {
+ nw = tw - 2 * c->border;
+ if(th > 2 * c->border) {
ny += (i - nmaster) * th;
- nh = th - 2 * BORDERPX;
+ nh = th - 2 * c->border;
}
- else /* fallback if th <= 2 * BORDERPX */
- nh = wah - 2 * BORDERPX;
+ else /* fallback if th <= 2 * c->border */
+ nh = wah - 2 * c->border;
}
resize(c, nx, ny, nw, nh, False);
i++;
t@@ -125,7 +125,7 @@ incmasterw(const char *arg) {
masterw = MASTERWIDTH;
else {
i = atoi(arg);
- if(waw * (masterw + i) / 1000 >= waw - 2 * BORDERPX
+ if(waw * (masterw + i) / 1000 >= waw - 2 * BORDERPX
|| waw * (masterw + i) / 1000 <= 2 * BORDERPX)
return;
masterw += i;
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.