A bit of cleanup

This commit is contained in:
Kovid Goyal 2020-04-11 21:22:17 +05:30
parent b4f24e4e1e
commit 41ffd58e26
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 3 deletions

View File

@ -208,7 +208,7 @@ class Layout: # {{{
name: Optional[str] = None
needs_window_borders = True
must_draw_borders = False
must_draw_borders = False # can be overridden to customize behavior from kittens
needs_all_windows = False
layout_opts = LayoutOpts({})
only_active_window_visible = False

View File

@ -227,11 +227,12 @@ class Tab: # {{{
if tm is not None:
visible_windows = [w for w in self.windows if w.is_visible_in_layout]
w = self.active_window
ly = self.current_layout
self.borders(
windows=visible_windows, active_window=w,
current_layout=self.current_layout, extra_blank_rects=tm.blank_rects,
current_layout=ly, 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 or self.current_layout.must_draw_borders
draw_window_borders=(ly.needs_window_borders and len(visible_windows) > 1) or ly.must_draw_borders
)
if w is not None:
w.change_titlebar_color()