contrib/inactive-windows-transparency: remove all transparencies on exit

Hidden windows in the scratchpad failed to have their transparency
reset upon program exit. This is because they are kept separetly in
`ipc.get_tree.scratchpad()`, and not in `ipc.get_tree.workspaces()`.
This commit is contained in:
gibbz00 2022-09-10 18:23:23 +00:00
parent 78b5c0a77e
commit 10c697d33a

View file

@ -32,9 +32,12 @@ def on_window_focus(inactive_opacity, ipc, event):
def remove_opacity(ipc): def remove_opacity(ipc):
for workspace in ipc.get_tree().workspaces(): tree = ipc.get_tree()
for w in workspace: for workspace in tree.workspaces():
w.command("opacity 1") for window in workspace:
window.command("opacity 1")
for window in tree.scratchpad():
window.command("opacity 1")
ipc.main_quit() ipc.main_quit()
sys.exit(0) sys.exit(0)