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.
This commit is contained in:
Franco Sebregondi 2020-04-11 17:01:44 +02:00
parent 688606ff7c
commit 75c8ffd715
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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()