Fix some size hint mixups

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-07-22 10:02:06 +02:00
parent 8e5409a2cd
commit 528747267a
1 changed files with 2 additions and 2 deletions

View File

@ -586,8 +586,8 @@ client_geometry_hints(client_t *c, area_t geometry)
minw = minh = 0; minw = minh = 0;
if(c->size_hints.flags & XCB_SIZE_HINT_P_ASPECT if(c->size_hints.flags & XCB_SIZE_HINT_P_ASPECT
&& c->size_hints.min_aspect_num > 0
&& c->size_hints.min_aspect_den > 0 && c->size_hints.min_aspect_den > 0
&& c->size_hints.max_aspect_den > 0
&& geometry.height - real_baseh > 0 && geometry.height - real_baseh > 0
&& geometry.width - real_basew > 0) && geometry.width - real_basew > 0)
{ {
@ -600,7 +600,7 @@ client_geometry_hints(client_t *c, area_t geometry)
double dx = (double) (geometry.width - real_basew); double dx = (double) (geometry.width - real_basew);
double dy = (double) (geometry.height - real_baseh); double dy = (double) (geometry.height - real_baseh);
double min = (double) c->size_hints.min_aspect_num / (double) c->size_hints.min_aspect_den; double min = (double) c->size_hints.min_aspect_num / (double) c->size_hints.min_aspect_den;
double max = (double) c->size_hints.max_aspect_num / (double) c->size_hints.min_aspect_den; double max = (double) c->size_hints.max_aspect_num / (double) c->size_hints.max_aspect_den;
double ratio = dx / dy; double ratio = dx / dy;
if(max > 0 && min > 0 && ratio > 0) if(max > 0 && min > 0 && ratio > 0)
{ {