mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
fix: crashing if app_id is invalid string
This commit is contained in:
parent
7845cbd275
commit
1e44f3fde3
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ def on_window_focus(not_focused_opacity, focused_opacity, focused_regex, ipc, ev
|
|||
workspace = ipc.get_tree().find_focused().workspace().num
|
||||
|
||||
if focused.id != prev_focused.id: # https://github.com/swaywm/sway/issues/2859
|
||||
if re.match(focused_regex, focused.app_id):
|
||||
if isinstance(focused.app_id, str) and re.match(focused_regex, focused.app_id):
|
||||
focused.command("opacity " + focused_opacity)
|
||||
else:
|
||||
focused.command("opacity 1")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue