No description
Find a file
Ian Douglas Scott 194d5c8967 protocols/screencopy: Make frame/session send stopped/fail on drop
Previously, `Frame` was stored in KMS frame udata, but in some cases the
udata was dropped without a capture happening, and `Frame` did not
implement `Drop`, so `fail` was never sent.

Instead, rename `DropableFrame` to `Frame` and `Frame` to `FrameRef`, so
we can have a single instance of `Frame`, that will send `fail` on drop.
This guarantees either `.success` or `.fail` are send, as long as its
not leaked.

This seems to fix https://github.com/pop-os/cosmic-comp/issues/1305.
xdg-desktop-portal-cosmic prints an error, buy retries (as it should for
an `Unknown` error; though maybe there should be a retry limit) and the
session continues working.

(Not sure if it should be sending `failed`, or queing it with the next
frame so it can send `success` to the client, but this works and is
desirable as a failsafe anyway.)

`Session` and `CursorSession` are similiarly updated.

`.fail()`, `.success()`, and `.stop()` now consume
`Frame`/`Session`/`CursorSession`. So to stop a session, it is now
necessary to call `.remove_session()`, but then simply dropping with
send `.stop()`.

Factoring out some `Request::Capture` handling into a `capture_frame`
function seems to clean up error handling and such a bit.
2025-05-19 16:53:46 -07:00
.github/workflows .github/workflows/build.yml: Pass +stable to cargo 2025-05-19 21:29:51 +02:00
cosmic-comp-config Initial support for workspace pinning and moving 2025-04-24 12:45:50 +02:00
data Fix display vim bindings (j and k were swapped) 2025-05-09 08:47:03 -06:00
debian chore: Add libdisplay-info dependency for packaging 2025-01-06 20:23:05 +01:00
resources i18n(zh-CN): update translation 2025-05-19 21:52:09 +02:00
src protocols/screencopy: Make frame/session send stopped/fail on drop 2025-05-19 16:53:46 -07: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-05-19 21:29:51 +02:00
Cargo.toml Remove deprecated call to time's set_soundness function 2025-05-19 21:29:51 +02: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 Update toolchain to Rust 1.85 2025-05-19 21:29:51 +02:00
rustfmt.toml Fix refresh_focus 2023-04-01 20:35:58 +04:00