[util/popup] fix endless loop on "close on leave"

When closing a popup window when the mouse leave the area (default
behaviour, unfortunately), the main "show()" got stuck in an infinite
loop.

Fix that by setting running to False when exiting.

fixes #844
This commit is contained in:
tobi-wan-kenobi 2022-01-14 13:39:04 +01:00
parent 8bde6378d4
commit 08b5386140
2 changed files with 7 additions and 5 deletions

View file

@ -49,6 +49,7 @@ class menu(object):
return self._menu
def __on_focus_out(self, event=None):
self.running = False
self._root.destroy()
def __on_click(self, callback):