client.c
changeset 310 f0b609fca3de
parent 308 b591412bd2da
child 311 099c595c53e6
equal deleted inserted replaced
309:204427dcc087 310:f0b609fca3de
   283 void
   283 void
   284 resize(Client *c, Bool sizehints, Corner sticky)
   284 resize(Client *c, Bool sizehints, Corner sticky)
   285 {
   285 {
   286 	int bottom = c->y + c->h;
   286 	int bottom = c->y + c->h;
   287 	int right = c->x + c->w;
   287 	int right = c->x + c->w;
   288 	/*XConfigureEvent e;*/
       
   289 	XWindowChanges wc;
   288 	XWindowChanges wc;
   290 
   289 
   291 	if(sizehints) {
   290 	if(sizehints) {
   292 		if(c->incw)
   291 		if(c->incw)
   293 			c->w -= (c->w - c->basew) % c->incw;
   292 			c->w -= (c->w - c->basew) % c->incw;
   300 		if(c->maxw && c->w > c->maxw)
   299 		if(c->maxw && c->w > c->maxw)
   301 			c->w = c->maxw;
   300 			c->w = c->maxw;
   302 		if(c->maxh && c->h > c->maxh)
   301 		if(c->maxh && c->h > c->maxh)
   303 			c->h = c->maxh;
   302 			c->h = c->maxh;
   304 	}
   303 	}
   305 	if(c->x > right) /* might happen on restart */
   304 	if(c->x > sw) /* might happen on restart */
   306 		c->x = right - c->w;
   305 		c->x = sw - c->w;
   307 	if(c->y > bottom)
   306 	if(c->y > sh)
   308 		c->y = bottom - c->h;
   307 		c->y = bottom - c->h;
   309 	if(sticky == TopRight || sticky == BotRight)
   308 	if(sticky == TopRight || sticky == BotRight)
   310 		c->x = right - c->w;
   309 		c->x = right - c->w;
   311 	if(sticky == BotLeft || sticky == BotRight)
   310 	if(sticky == BotLeft || sticky == BotRight)
   312 		c->y = bottom - c->h;
   311 		c->y = bottom - c->h;