No description
Find a file
Ian Douglas Scott 7340e2beff Improve handling of XDG activation tokens in shell
Requires https://github.com/Smithay/smithay/pull/1676.

This changes two things:
* `Workspace::is_empty` no longer checks if there are activation tokens,
  but a separate `Workspace::can_auto_remove` checks if the workspace is
  empty and has no activation tokens.
  - When we add workspace pinning, that can also be checked there.
* `Workspace` no longer contains a `pending_tokens` list that is updated
  on `refresh`. Instead, `can_auto_remove` takes the xdg activation
  state as an argument.

Since `Workspace::refresh` normally is run for focused workspaces, this
fixes allowing non-focused workspaces to be removed when an activation
token expires. It seems generally good to avoid tracking the activation
tokens in two places, and this is probably more efficient than needing
to refresh in more places.

By splitting this, we still don't remove an empty workspace if it has a
pending activation token, but we also don't add an empty workspace for
an activation token.

This mitigates the confusing behavior with activation tokens that aren't
used, but having to wait a few seconds in some cases before a workspace
is removed is still a little confusing. (We probably want `cosmic-term`
and `cosmic-workspace` to either consume the activation tokens they are
passed, or not be passed tokens when started by keybinding?)

Fixes https://github.com/pop-os/cosmic-comp/issues/1099.
2025-03-14 17:53:34 +01:00
.github/workflows ci: Update unsupported cache v2 action to v4 2025-03-03 13:31:46 -08:00
cosmic-comp-config config: Update zoom config defaults 2025-02-20 23:51:55 +01:00
data actions: Shortcut handling changes for #1005 2025-03-05 18:24:28 +01:00
debian chore: Add libdisplay-info dependency for packaging 2025-01-06 20:23:05 +01:00
resources i18n (pt-BR) update translation 2025-03-05 18:27:32 +01:00
src Improve handling of XDG activation tokens in shell 2025-03-14 17:53:34 +01:00
.gitignore Rework source filtering. 2023-01-04 01:52:16 -08:00
build.rs deps: Update to wayland-rs.0.30 2022-07-04 16:01:06 +02:00
Cargo.lock Update smithay 2025-03-14 17:53:34 +01:00
Cargo.toml Update smithay 2025-03-14 17:53:34 +01:00
flake.lock Update and fix flake.nix 2024-09-02 19:44:51 +02:00
flake.nix fix: add missing libdisplay-info library into flake.nix 2025-01-12 13:09:03 +01:00
i18n.toml i18n support 2023-07-06 00:04:34 +02:00
LICENSE Initial commit 2021-12-15 17:25:15 +01:00
Makefile Use new config from cosmic-settings-config 2024-09-04 20:50:42 +02:00
rust-toolchain.toml chore: Update rust toolchain 2025-03-12 18:31:39 +01:00
rustfmt.toml Fix refresh_focus 2023-04-01 20:35:58 +04:00