Skip to content

Commit

Permalink
Fix TreeTab draw resolution issue
Browse files Browse the repository at this point in the history
When a TreeTab layout moves between screens with different resolutions,
the Drawer object is not updated to reflect the new size. This means
that rendering issues can arise when moving from a lower resolution
screen to a larger resolution.

Fixes #4634
  • Loading branch information
elParaguayo committed Dec 23, 2023
1 parent bed7094 commit 7f84c40
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libqtile/layout/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,12 @@ def decrease_ratio(self):
self.group.layout_all()

def _create_drawer(self, screen_rect):
# Create a new drawer object if the screen is a different height
# e.g. if moving between screens with different resolutions
if self._drawer is not None and self._drawer.height != screen_rect.height:
self._drawer.finalize()
self._drawer = None

if self._drawer is None:
self._drawer = self._panel.create_drawer(
self.panel_width,
Expand Down

0 comments on commit 7f84c40

Please sign in to comment.