From 4a6be622a88668cab02790191c312323a848fbbe Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Sat, 3 Apr 2021 19:29:40 +0000 Subject: [PATCH] [modules/rotation] fix widget creation each iteration of the rotation module created new/duplicate widgets, causing a status bar of infinite length. fixes #782 --- bumblebee_status/modules/contrib/rotation.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bumblebee_status/modules/contrib/rotation.py b/bumblebee_status/modules/contrib/rotation.py index 13f656e..d05c463 100644 --- a/bumblebee_status/modules/contrib/rotation.py +++ b/bumblebee_status/modules/contrib/rotation.py @@ -31,14 +31,13 @@ class Module(core.module.Module): orientation = curr_orient break - widget = self.widget(display) + widget = self.widget(name=display) if not widget: widget = self.add_widget(full_text=display, name=display) core.input.register( widget, button=core.input.LEFT_MOUSE, cmd=self.__toggle ) widget.set("orientation", orientation) - widgets.append(widget) def state(self, widget): return widget.get("orientation", "normal")