Don't consider scratchpad windows in switch-to-urgent-or-lru-window (fixes #2)

timeout_old
Tassilo Horn 4 years ago
parent d47e592c56
commit ddee71bac5
  1. 6
      src/cmds.rs
  2. 2
      src/con.rs

@ -95,7 +95,7 @@ pub fn switch_to_urgent_or_lru_window(
extra_props: Option<&HashMap<i64, ipc::ExtraProps>>, extra_props: Option<&HashMap<i64, ipc::ExtraProps>>,
) { ) {
let root = get_tree(); 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 if let Some(win) = windows
.iter() .iter()
.find(|w| w.is_urgent()) .find(|w| w.is_urgent())
@ -175,7 +175,7 @@ pub fn switch_workspace_or_window(
extra_props: Option<&HashMap<i64, ipc::ExtraProps>>, extra_props: Option<&HashMap<i64, ipc::ExtraProps>>,
) { ) {
let root = get_tree(); 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); let ws_or_wins = con::WsOrWin::from_workspaces(&workspaces);
if let Some(ws_or_win) = con::select_workspace_or_window( if let Some(ws_or_win) = con::select_workspace_or_window(
"Select workspace or window", "Select workspace or window",
@ -203,7 +203,7 @@ pub fn quit_workspace_or_window(
extra_props: Option<&HashMap<i64, ipc::ExtraProps>>, extra_props: Option<&HashMap<i64, ipc::ExtraProps>>,
) { ) {
let root = get_tree(); 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); let ws_or_wins = con::WsOrWin::from_workspaces(&workspaces);
if let Some(ws_or_win) = if let Some(ws_or_win) =
con::select_workspace_or_window("Quit workspace or window", &ws_or_wins) con::select_workspace_or_window("Quit workspace or window", &ws_or_wins)

@ -175,7 +175,7 @@ pub fn get_windows<'a>(
wins wins
} }
/// Gets all application windows of the tree. /// Gets all workspaces of the tree.
pub fn get_workspaces<'a>( pub fn get_workspaces<'a>(
root: &'a r::Node, root: &'a r::Node,
include_scratchpad: bool, include_scratchpad: bool,

Loading…
Cancel
Save