X-Git-Url: https://jasonwoof.com/gitweb/?p=dwm.git;a=blobdiff_plain;f=client.c;h=7c00f20f7cc05915837afa7e49ef03b925e06807;hp=d69134017a829a35156bec99bf46dd9bd26a6fa1;hb=cb4aa5bc35cf16a06bb2b4e880648e390fa2cc55;hpb=4ca3d861f024d17aeee28744f935fd55dd89a285 diff --git a/client.c b/client.c index d691340..7c00f20 100644 --- a/client.c +++ b/client.c @@ -1,4 +1,4 @@ -/* (C)opyright MMVI Anselm R. Garbe +/* (C)opyright MMVII Anselm R. Garbe * See LICENSE file for license details. */ #include "dwm.h" @@ -132,59 +132,6 @@ getctitle(Window w) { } void -gravitate(Client *c, Bool invert) { - int dx = 0, dy = 0; - - return; - switch(c->grav) { - default: - break; - case StaticGravity: - case NorthWestGravity: - case NorthGravity: - case NorthEastGravity: - dy = c->border; - break; - case EastGravity: - case CenterGravity: - case WestGravity: - dy = -(c->h / 2) + c->border; - break; - case SouthEastGravity: - case SouthGravity: - case SouthWestGravity: - dy = -(c->h); - break; - } - switch (c->grav) { - default: - break; - case StaticGravity: - case NorthWestGravity: - case WestGravity: - case SouthWestGravity: - dx = c->border; - break; - case NorthGravity: - case CenterGravity: - case SouthGravity: - dx = -(c->w / 2) + c->border; - break; - case NorthEastGravity: - case EastGravity: - case SouthEastGravity: - dx = -(c->w + c->border); - break; - } - if(invert) { - dx = -dx; - dy = -dy; - } - c->x += dx; - c->y += dy; -} - -void killclient(Arg *arg) { if(!sel) return; @@ -209,7 +156,7 @@ manage(Window w, XWindowAttributes *wa) { c->w = c->tw = wa->width; c->h = wa->height; c->th = bh; - updatesize(c); + updatesizehints(c); if(c->x + c->w + 2 * BORDERPX > sw) c->x = sw - c->w - 2 * BORDERPX; if(c->x < sx) @@ -291,7 +238,7 @@ resize(Client *c, Bool sizehints, Corner sticky) { else wc.border_width = BORDERPX; XConfigureWindow(dpy, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc); - /*configure(c);*/ + configure(c); XSync(dpy, False); } @@ -309,7 +256,7 @@ resizetitle(Client *c) { } void -updatesize(Client *c) { +updatesizehints(Client *c) { long msize; XSizeHints size; @@ -342,10 +289,6 @@ updatesize(Client *c) { c->minw = c->minh = 0; c->isfixed = (c->maxw && c->minw && c->maxh && c->minh && c->maxw == c->minw && c->maxh == c->minh); - if(c->flags & PWinGravity) - c->grav = size.win_gravity; - else - c->grav = NorthWestGravity; } void