From 55121c86d44e7ab65f74e3c45a42fe7a9f8874df Mon Sep 17 00:00:00 2001 From: tobi-wan-kenobi Date: Sat, 30 May 2020 15:18:40 +0200 Subject: [PATCH] [util/popup] add generic "close" on root menu add a "close" entry for the root menu of all popup menus (if they are not automatically destroyed when leaving the menu). fixes #633 --- bumblebee_status/util/popup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bumblebee_status/util/popup.py b/bumblebee_status/util/popup.py index 85fe50b..f162846 100644 --- a/bumblebee_status/util/popup.py +++ b/bumblebee_status/util/popup.py @@ -22,6 +22,9 @@ class menu(object): self._root.withdraw() self._menu = tk.Menu(self._root, tearoff=0) self._menu.bind("", self.__on_focus_out) + + self.add_menuitem("close", self.__on_focus_out) + self.add_separator() else: self._root = parent.root() self._root.withdraw()