Fix panic in get_workspaces_and_windows()

timeout_old
Tassilo Horn 3 years ago
parent 78153b237d
commit c6ab01fda2
  1. 4
      Cargo.lock
  2. 2
      src/tree.rs

4
Cargo.lock generated

@ -321,9 +321,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.70" version = "1.0.71"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e277c495ac6cd1a01a58d0a0c574568b4d1ddf14f59965c6a58b8d96400b54f3" checksum = "063bf466a64011ac24040a49009724ee60a57da1b437617ceb32e53ad61bfb19"
dependencies = [ dependencies = [
"itoa", "itoa",
"ryu", "ryu",

@ -286,7 +286,7 @@ impl<'a> Tree<'a> {
for ws in workspaces { for ws in workspaces {
v.push(ws); v.push(ws);
let mut wins = self.sorted_nodes_of_type_1(ws, Type::Window); let mut wins = self.sorted_nodes_of_type_1(ws, Type::Window);
if first { if first && !v.is_empty() {
wins.rotate_left(1); wins.rotate_left(1);
first = false; first = false;
} }

Loading…
Cancel
Save