Erroneously checked for None on attribute instead of object
This commit is contained in:
parent
cd4af99566
commit
c4964abe96
|
@ -30,7 +30,7 @@ def on_window_focus(opacity, ipc, event):
|
||||||
focused = event.container
|
focused = event.container
|
||||||
workspace = focused_workspace.workspace().num
|
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")
|
focused.command("opacity 1")
|
||||||
if workspace == prev_workspace and not prev_focused.sticky:
|
if workspace == prev_workspace and not prev_focused.sticky:
|
||||||
prev_focused.command("opacity " + opacity)
|
prev_focused.command("opacity " + opacity)
|
||||||
|
|
Loading…
Reference in New Issue