diff --git a/umu/umu_run.py b/umu/umu_run.py index 657f22d2..967ca0f3 100755 --- a/umu/umu_run.py +++ b/umu/umu_run.py @@ -594,18 +594,19 @@ def monitor_windows( window_client_list: list[str], ) -> None: """Monitor for new windows and assign them Steam's layer ID.""" + window_client_set: set[str] = set(window_client_list) steam_assigned_layer_id: int = gamescope_baselayer_sequence[-1] log.debug("Monitoring windows") while True: # Check if the window sequence has changed - current_window_list = get_window_client_ids(d_secondary) + current_window_list: set[str] = set(get_window_client_ids(d_secondary)) if not current_window_list: continue - if current_window_list != window_client_list: + if window_client_set.difference(current_window_list): log.debug("New windows detected") set_steam_game_property( d_secondary, current_window_list, steam_assigned_layer_id