From ffd20489a2beacecf295f138dcfb9f6106d6a606 Mon Sep 17 00:00:00 2001 From: Phillip Berndt Date: Sun, 31 Jul 2022 15:47:51 +0200 Subject: [PATCH] Round up framebuffer size Rather than rounding down, to make sure the framebuffer is large enough. Fixes #296 --- autorandr.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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): -- 2.39.2