From: Phillip Berndt Date: Sun, 31 Jul 2022 13:47:51 +0000 (+0200) Subject: Round up framebuffer size X-Git-Tag: 1.13~15 X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Fautorandr.git;a=commitdiff_plain;h=ffd20489a2beacecf295f138dcfb9f6106d6a606 Round up framebuffer size Rather than rounding down, to make sure the framebuffer is large enough. Fixes #296 --- diff --git a/autorandr.py b/autorandr.py index 9f3384c..fe1906d 100755 --- a/autorandr.py +++ b/autorandr.py @@ -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):