]> git.sur5r.net Git - i3/i3/commitdiff
Merge pull request #3430 from Synray/aspect_ratio
authorOrestis <orestisf1993@gmail.com>
Tue, 2 Oct 2018 00:04:21 +0000 (03:04 +0300)
committerGitHub <noreply@github.com>
Tue, 2 Oct 2018 00:04:21 +0000 (03:04 +0300)
[RFC] Correctly calculate max_aspect

src/handlers.c

index 2cd45b7978fb4dc95318447b867742c474cf2843..c76f1935d34a1a34909391cad046fc12fae8cd30 100644 (file)
@@ -1072,7 +1072,7 @@ static bool handle_normal_hints(void *data, xcb_connection_t *conn, uint8_t stat
 
     /* Convert numerator/denominator to a double */
     double min_aspect = (double)size_hints.min_aspect_num / size_hints.min_aspect_den;
-    double max_aspect = (double)size_hints.max_aspect_num / size_hints.min_aspect_den;
+    double max_aspect = (double)size_hints.max_aspect_num / size_hints.max_aspect_den;
 
     DLOG("Aspect ratio set: minimum %f, maximum %f\n", min_aspect, max_aspect);
     DLOG("width = %f, height = %f\n", width, height);