Fix some size hint mixups
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
8e5409a2cd
commit
528747267a
|
@ -586,8 +586,8 @@ client_geometry_hints(client_t *c, area_t geometry)
|
|||
minw = minh = 0;
|
||||
|
||||
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.max_aspect_den > 0
|
||||
&& geometry.height - real_baseh > 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 dy = (double) (geometry.height - real_baseh);
|
||||
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;
|
||||
if(max > 0 && min > 0 && ratio > 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue