Skip to content

Commit

Permalink
fix(layout): fix tab bar rendering issue for qtile 0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
aravinda0 committed Oct 16, 2023
1 parent 17411d6 commit fa50955
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/qtile_bonsai/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ def render(self, screen_rect: ScreenRect, tree: "BonsaiTree"):

self.bar_drawer.width = bar_rect.w
self.bar_drawer.height = bar_rect.h

# NOTE: This hack is a workaround after some changes in qtile 0.23. When the
# drawer surface width expands, the xcb surface is freed, but not re-created.
# Re-creation only happens later when `drawer._check_xcb()` is invoked in
# `drawer.draw()`. But that check doesn't happen in `drawer.clear()`, and
# that's when we face an exception.
self.bar_drawer._check_xcb()

self.bar_drawer.clear(tab_bar_bg_color)

offset = 0
Expand Down

0 comments on commit fa50955

Please sign in to comment.