Skip to content

image-copy: properly handle capture session destruction for cursor sessions - #2170

Open
pgaskin wants to merge 1 commit into
Smithay:masterfrom
pgaskin:ext-image-copy-capture-cursor-session-destroy
Open

pgaskin wants to merge 1 commit into
Smithay:masterfrom
pgaskin:ext-image-copy-capture-cursor-session-destroy

Conversation

@pgaskin

@pgaskin pgaskin commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Previously, destroying the capture session wouldn't destroy the cursor session and fail the frames like it does when destroying the cursor session itself, or regular sessions.

Tested with niri-wm/niri#4554.

cc @YaLTeR

Checklist

…ssions

Previously, destroying the capture session wouldn't destroy the cursor
session and fail the frames like it does when destroying the cursor
session itself, or regular sessions.
@pgaskin

pgaskin commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Not directly related to this PR, but @ids1024 may be interested in niri-wm/niri#4554 (comment) (cosmic implements frame handling on session destruction differently than the others).

inner: Arc<Mutex<CursorSessionInner>>,
user_data: Arc<UserDataMap>,
/// Cursor session to destroy.
cursor_obj: Option<ExtImageCopyCaptureCursorSessionV1>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using Option, it would probably make sense to split CursorSessionData into two types; one used to implement dispatch for ExtImageCopyCaptureSessionV1 and another for ExtImageCopyCaptureSessionV1?

I would also make this a Weak<ExtImageCopyCaptureCursorSessionV1> if we don't need a strong reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants