[util/popup] replace mainloop with custom loop
add a custom event loop for popups that closes the menu on mouse button release events and - most importantly - propagates this event back to any parent menu. fixes #633
This commit is contained in:
parent
b9a30ae235
commit
1c04068f89
2 changed files with 23 additions and 2 deletions
|
@ -48,7 +48,7 @@ def build_menu(parent, current_directory, callback):
|
|||
)
|
||||
|
||||
else:
|
||||
submenu = util.popup.menu(parent, leave=True)
|
||||
submenu = util.popup.menu(parent, leave=False)
|
||||
build_menu(
|
||||
submenu, os.path.join(current_directory, entry.name), callback
|
||||
)
|
||||
|
@ -88,6 +88,7 @@ class Module(core.module.Module):
|
|||
"pass show -c {}".format(secret_name),
|
||||
wait=False,
|
||||
env=env,
|
||||
ignore_errors=True,
|
||||
)
|
||||
self.__timer = threading.Timer(self.__duration, self.__reset)
|
||||
self.__timer.start()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue