From 8c396ff27d7c5f27a464fc04af6b7ca189d0c51f Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Wed, 17 Feb 2021 14:54:42 +0100 Subject: [PATCH] con_props -> extra_props --- src/con.rs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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() } }