Fix incorrect border drawing when multiple tabs and multiple OS Windows are present and some of the OS Windows have tab bars and some dont
Fixes #3634
This commit is contained in:
parent
b7072d4097
commit
bac6ebdf95
@ -218,7 +218,7 @@ class Layout:
|
|||||||
self.remove_all_biases()
|
self.remove_all_biases()
|
||||||
|
|
||||||
def bias_increment_for_cell(self, is_horizontal: bool) -> float:
|
def bias_increment_for_cell(self, is_horizontal: bool) -> float:
|
||||||
self._set_dimensions()
|
self.set_dimensions()
|
||||||
if is_horizontal:
|
if is_horizontal:
|
||||||
return (lgd.cell_width + 1) / lgd.central.width
|
return (lgd.cell_width + 1) / lgd.central.width
|
||||||
return (lgd.cell_height + 1) / lgd.central.height
|
return (lgd.cell_height + 1) / lgd.central.height
|
||||||
@ -297,11 +297,11 @@ class Layout:
|
|||||||
is_visible = window is active_window or (is_group_leader and not self.only_active_window_visible)
|
is_visible = window is active_window or (is_group_leader and not self.only_active_window_visible)
|
||||||
window.set_visible_in_layout(is_visible)
|
window.set_visible_in_layout(is_visible)
|
||||||
|
|
||||||
def _set_dimensions(self) -> None:
|
def set_dimensions(self) -> None:
|
||||||
lgd.central, tab_bar, vw, vh, lgd.cell_width, lgd.cell_height = viewport_for_window(self.os_window_id)
|
lgd.central, tab_bar, vw, vh, lgd.cell_width, lgd.cell_height = viewport_for_window(self.os_window_id)
|
||||||
|
|
||||||
def __call__(self, all_windows: WindowList) -> None:
|
def __call__(self, all_windows: WindowList) -> None:
|
||||||
self._set_dimensions()
|
self.set_dimensions()
|
||||||
self.update_visibility(all_windows)
|
self.update_visibility(all_windows)
|
||||||
self.blank_rects = []
|
self.blank_rects = []
|
||||||
self.do_layout(all_windows)
|
self.do_layout(all_windows)
|
||||||
|
|||||||
@ -204,6 +204,7 @@ class Tab: # {{{
|
|||||||
if tm is not None:
|
if tm is not None:
|
||||||
w = self.active_window
|
w = self.active_window
|
||||||
ly = self.current_layout
|
ly = self.current_layout
|
||||||
|
ly.set_dimensions()
|
||||||
self.borders(
|
self.borders(
|
||||||
all_windows=self.windows,
|
all_windows=self.windows,
|
||||||
current_layout=ly, extra_blank_rects=tm.blank_rects,
|
current_layout=ly, extra_blank_rects=tm.blank_rects,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user