fix: consistent ordering of workspaces
This commit is contained in:
parent
10a0312f4f
commit
0ecba6a6d0
3 changed files with 6 additions and 1 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
|
@ -500,6 +500,7 @@ dependencies = [
|
|||
"gtk4",
|
||||
"i18n-embed",
|
||||
"i18n-embed-fl",
|
||||
"itertools",
|
||||
"libadwaita",
|
||||
"libcosmic",
|
||||
"log",
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ wayland-client = { version = "0.30.0-beta.8" }
|
|||
calloop = "*"
|
||||
nix = "*"
|
||||
log = "0.4"
|
||||
itertools = "0.10"
|
||||
|
||||
[build-dependencies]
|
||||
gio = "0.15.10"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ use gtk4::Inhibit;
|
|||
use gtk4::ListView;
|
||||
use gtk4::SignalListItemFactory;
|
||||
use gtk4::{gio, glib, prelude::*, subclass::prelude::*};
|
||||
use itertools::Itertools;
|
||||
|
||||
mod imp;
|
||||
|
||||
|
|
@ -75,7 +76,9 @@ impl WorkspaceList {
|
|||
let model_len = model.n_items();
|
||||
let new_results: Vec<glib::Object> = workspaces
|
||||
.workspace_list()
|
||||
.into_iter()
|
||||
.sorted_by(|a, b| {
|
||||
a.0.cmp(&b.0)
|
||||
})
|
||||
.filter_map(|w| {
|
||||
// don't include hidden workspaces
|
||||
if w.1 != 2 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue