client_resize: apply size hints before calling client_resize_do

This will skip calling `client_resize_do` in case of honored size hints.

This could be also done in `client_resize_do`, but it appears to be
meant to force the resize.

Closes https://github.com/awesomeWM/awesome/pull/383.
This commit is contained in:
Daniel Hahler 2015-08-01 16:44:20 +02:00
parent b028a0ba1d
commit 56d9e3b9de

View file

@ -913,12 +913,15 @@ client_resize(client_t *c, area_t geometry, bool honor_hints)
if(geometry.width == 0 || geometry.height == 0)
return false;
if (honor_hints)
geometry = client_apply_size_hints(c, geometry);
if(c->geometry.x != geometry.x
|| c->geometry.y != geometry.y
|| c->geometry.width != geometry.width
|| c->geometry.height != geometry.height)
{
client_resize_do(c, geometry, false, honor_hints);
client_resize_do(c, geometry, false, false);
return true;
}