Erroneously checked for None on attribute instead of object

This commit is contained in:
John Mertz 2024-03-08 12:33:32 -07:00
parent cd4af99566
commit c4964abe96
1 changed files with 1 additions and 1 deletions

View File

@ -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)