Fix failing tests

This commit is contained in:
Kovid Goyal 2025-10-22 13:21:53 +05:30
parent 8e2b489eed
commit 26ea343f95
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -2,6 +2,8 @@
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
from kitty.config import defaults
from kitty.fast_data_types import Region
from kitty.layout.base import lgd
from kitty.layout.interface import Grid, Horizontal, Splits, Stack, Tall
from kitty.types import WindowGeometry
from kitty.window import EdgeWidths
@ -47,6 +49,12 @@ def create_layout(cls, opts=None, border_width=2):
ans = cls(1, 1)
ans.set_active_window_in_os_window = lambda idx: None
ans.swap_windows_in_os_window = lambda a, b: None
orig = ans._set_dimensions
def set_dimensions(all_windows):
orig(all_windows)
# we need a non-zero width and height for central
lgd.central = Region((0, 0, 0, 0, 1, 1))
ans._set_dimensions = set_dimensions
return ans