From c4964abe962151f0c2fc6b2fca6568af0cd64a4f Mon Sep 17 00:00:00 2001 From: John Mertz Date: Fri, 8 Mar 2024 12:33:32 -0700 Subject: [PATCH] Erroneously checked for None on attribute instead of object --- sway/sway-transparency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/sway-transparency.py b/sway/sway-transparency.py index 215ea14..421b53f 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 prev_focused.id and focused.id != prev_focused.id: # https://github.com/swaywm/sway/issues/2859 + if prev_focused 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)