X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=client.c;h=a02dda5ff0c63ae598cc4680233c8fa0cd51da5d;hb=9056d7ea8828822868614eab925c69cd17ba8b37;hp=74cadb5f00756b14b8c54ecb0411e616fef08175;hpb=61a1910f91fe6aba428193087d6c3ff21374ee5e;p=dwm.git diff --git a/client.c b/client.c index 74cadb5..a02dda5 100644 --- a/client.c +++ b/client.c @@ -132,58 +132,6 @@ getctitle(Window w) { } void -gravitate(Client *c, Bool invert) { - int dx = 0, dy = 0; - - 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; @@ -208,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) @@ -308,7 +256,7 @@ resizetitle(Client *c) { } void -updatesize(Client *c) { +updatesizehints(Client *c) { long msize; XSizeHints size; @@ -341,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