mirror of
https://github.com/swaywm/sway.git
synced 2026-04-23 06:46:27 -04:00
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:
parent
78b5c0a77e
commit
10c697d33a
1 changed files with 7 additions and 4 deletions
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue