diff --git a/sway/sway-transparency.py b/sway/sway-transparency.py index e153d8f..215ea14 100755 --- a/sway/sway-transparency.py +++ b/sway/sway-transparency.py @@ -30,7 +30,7 @@ def on_window_focus(opacity, ipc, event): focused = event.container workspace = focused_workspace.workspace().num - if focused.id != prev_focused.id: # https://github.com/swaywm/sway/issues/2859 + if prev_focused.id and focused.id != prev_focused.id: # https://github.com/swaywm/sway/issues/2859 focused.command("opacity 1") if workspace == prev_workspace and not prev_focused.sticky: prev_focused.command("opacity " + opacity)