]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Round up framebuffer size
authorPhillip Berndt <phillip.berndt@googlemail.com>
Sun, 31 Jul 2022 13:47:51 +0000 (15:47 +0200)
committerPhillip Berndt <phillip.berndt@googlemail.com>
Sun, 31 Jul 2022 13:49:10 +0000 (15:49 +0200)
Rather than rounding down, to make sure the framebuffer is large enough.

Fixes #296

autorandr.py

index 9f3384c1a80088e4a5ebf207dd91a9b5a6e34d1d..fe1906d16e83b2fed2f71ddbee8592eee1ce6ff9 100755 (executable)
@@ -28,6 +28,7 @@ import binascii
 import copy
 import getopt
 import hashlib
+import math
 import os
 import posix
 import pwd
@@ -855,7 +856,7 @@ def get_fb_dimensions(configuration):
                 o_height = int(detail.get("h")) + int(detail.get("y"))
         width = max(width, o_width)
         height = max(height, o_height)
-    return int(width), int(height)
+    return math.ceil(width), math.ceil(height)
 
 
 def apply_configuration(new_configuration, current_configuration, dry_run=False):