From 75c8ffd715986dcb68afa2a7f3121909ca67bb74 Mon Sep 17 00:00:00 2001 From: Franco Sebregondi Date: Sat, 11 Apr 2020 17:01:44 +0200 Subject: [PATCH] Add flag to Layout to enforce drawing a border Layout.must_draw_borders = True enforces drawing of a border even though only a single window is visible. See #2531. --- kitty/layout.py | 1 + kitty/tabs.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/layout.py b/kitty/layout.py index dce054793..19c979d42 100644 --- a/kitty/layout.py +++ b/kitty/layout.py @@ -208,6 +208,7 @@ class Layout: # {{{ name: Optional[str] = None needs_window_borders = True + must_draw_borders = False needs_all_windows = False layout_opts = LayoutOpts({}) only_active_window_visible = False diff --git a/kitty/tabs.py b/kitty/tabs.py index d52996943..fab3a588b 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -231,7 +231,7 @@ class Tab: # {{{ windows=visible_windows, active_window=w, current_layout=self.current_layout, extra_blank_rects=tm.blank_rects, padding_width=self.padding_width, border_width=self.border_width, - draw_window_borders=self.current_layout.needs_window_borders and len(visible_windows) > 1 + draw_window_borders=self.current_layout.needs_window_borders and len(visible_windows) > 1 or self.current_layout.must_draw_borders ) if w is not None: w.change_titlebar_color()