sway: use default config if focused window provides no app_id or window_properties (#27)
sway: use default config if focused window provides no app_id or window_properties
This commit is contained in:
parent
28e110e3da
commit
4aab013eb8
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,9 @@ pub async fn get_active_window(environment: &Environment, config: &Vec<Config>)
|
|||
{
|
||||
Some(window) => match window.app_id {
|
||||
Some(id) => Client::Class(id),
|
||||
None => Client::Class(window.window_properties.unwrap().class.unwrap()),
|
||||
None => window.window_properties
|
||||
.and_then(|window_properties| window_properties.class)
|
||||
.map_or(Client::Default, Client::Class),
|
||||
},
|
||||
None => Client::Default,
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue