Skip to content

Commit

Permalink
Fix mirrors when single widget list passed to multiple bars
Browse files Browse the repository at this point in the history
  • Loading branch information
elParaguayo committed Dec 23, 2023
1 parent fbf7fd3 commit bed7094
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libqtile/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ def __init__(self, widgets: list[_Widget], size: int, **config: Any) -> None:
Gap.__init__(self, size)
configurable.Configurable.__init__(self, **config)
self.add_defaults(Bar.defaults)
self.widgets = widgets
# We need to create a new widget list here as users may have the same list for multiple
# screens. In that scenario, if we replace the widget with a mirror, it replaces it in every
# bar as python is referring to the same list.
self.widgets = widgets.copy()
self.window: Internal | None = None
self._configured = False
self._draw_queued = False
Expand Down

0 comments on commit bed7094

Please sign in to comment.