From ddee71bac57e58dcc5b1d20639fb8f9222dcc2f8 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Tue, 23 Feb 2021 07:47:29 +0100 Subject: [PATCH] Don't consider scratchpad windows in switch-to-urgent-or-lru-window (fixes #2) --- src/cmds.rs | 6 +++--- src/con.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cmds.rs b/src/cmds.rs index e39061d..6348b6b 100644 --- a/src/cmds.rs +++ b/src/cmds.rs @@ -95,7 +95,7 @@ pub fn switch_to_urgent_or_lru_window( extra_props: Option<&HashMap>, ) { let root = get_tree(); - let windows = con::get_windows(&root, true, extra_props); + let windows = con::get_windows(&root, false, extra_props); if let Some(win) = windows .iter() .find(|w| w.is_urgent()) @@ -175,7 +175,7 @@ pub fn switch_workspace_or_window( extra_props: Option<&HashMap>, ) { let root = get_tree(); - let workspaces = con::get_workspaces(&root, false, extra_props); + let workspaces = con::get_workspaces(&root, true, extra_props); let ws_or_wins = con::WsOrWin::from_workspaces(&workspaces); if let Some(ws_or_win) = con::select_workspace_or_window( "Select workspace or window", @@ -203,7 +203,7 @@ pub fn quit_workspace_or_window( extra_props: Option<&HashMap>, ) { let root = get_tree(); - let workspaces = con::get_workspaces(&root, false, extra_props); + let workspaces = con::get_workspaces(&root, true, extra_props); let ws_or_wins = con::WsOrWin::from_workspaces(&workspaces); if let Some(ws_or_win) = con::select_workspace_or_window("Quit workspace or window", &ws_or_wins) diff --git a/src/con.rs b/src/con.rs index 26aff6f..7ff611e 100644 --- a/src/con.rs +++ b/src/con.rs @@ -175,7 +175,7 @@ pub fn get_windows<'a>( wins } -/// Gets all application windows of the tree. +/// Gets all workspaces of the tree. pub fn get_workspaces<'a>( root: &'a r::Node, include_scratchpad: bool,