Handle sway application support for XWayland windows

XWayland windows have null app_id, look for and return window_properties.class instead.
pull/65/head
Mark Knoop 3 years ago
parent 4b8690b917
commit c2c331e03f

@ -50,7 +50,11 @@ impl Client for SwayClient {
if let Ok(node) = connection.get_tree() {
if let Some(node) = node.find_focused(|n| n.focused) {
return node.app_id;
if node.app_id.is_some() {
return node.app_id;
} else if let Some(wp) = node.window_properties {
return wp.class;
}
}
}
None

Loading…
Cancel
Save