diff --git a/src/con.rs b/src/con.rs index 7275009..cbaeaab 100644 --- a/src/con.rs +++ b/src/con.rs @@ -142,7 +142,8 @@ fn build_workspaces<'a>( wins.sort(); v.push(Workspace { node: &workspace, - con_props: extra_props.and_then(|m| m.get(&workspace.id).cloned()), + extra_props: extra_props + .and_then(|m| m.get(&workspace.id).cloned()), windows: wins, }) } @@ -167,9 +168,9 @@ pub fn get_windows<'a>( pub fn get_workspaces<'a>( root: &'a r::Node, include_scratchpad: bool, - con_props: Option<&HashMap>, + extra_props: Option<&HashMap>, ) -> Vec> { - let workspaces = build_workspaces(root, con_props); + let workspaces = build_workspaces(root, extra_props); let mut workspaces = if include_scratchpad { workspaces } else { @@ -237,7 +238,7 @@ pub fn select_workspace_or_window<'a>( pub struct Workspace<'a> { node: &'a r::Node, - con_props: Option, + extra_props: Option, pub windows: Vec>, } @@ -269,9 +270,11 @@ impl Ord for Workspace<'_> { cmp::Ordering::Equal } else { let lru_a = - self.con_props.as_ref().map_or(0, |wp| wp.last_focus_time); - let lru_b = - other.con_props.as_ref().map_or(0, |wp| wp.last_focus_time); + self.extra_props.as_ref().map_or(0, |wp| wp.last_focus_time); + let lru_b = other + .extra_props + .as_ref() + .map_or(0, |wp| wp.last_focus_time); lru_a.cmp(&lru_b).reverse() } }