Skip to content

wayland: Don't clear the clipboard when a nil selection is ignored#16039

Merged
Kontrabant merged 1 commit into
libsdl-org:mainfrom
Kontrabant:wl_offer_destroy
Jul 22, 2026
Merged

wayland: Don't clear the clipboard when a nil selection is ignored#16039
Kontrabant merged 1 commit into
libsdl-org:mainfrom
Kontrabant:wl_offer_destroy

Conversation

@Kontrabant

Copy link
Copy Markdown
Contributor
  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

If the previous selection offering was recursive, a nil selection should be ignored, or clearing the clipboard may clear the backing memory of the client's selection offering as well.

Fixes #16037

If the previous selection offering was recursive, a nil selection should be ignored, or clearing the clipboard may clear the backing memory of the client's selection offering as well.
@mahkoh

mahkoh commented Jul 22, 2026

Copy link
Copy Markdown

Works for me.

@Kontrabant

Copy link
Copy Markdown
Contributor Author

Thanks for confirming!

@Kontrabant
Kontrabant merged commit cc2713c into libsdl-org:main Jul 22, 2026
10 checks passed
@Kontrabant

Copy link
Copy Markdown
Contributor Author

Going over the clipboard code again, as a whole it can definitely be do some things better, but I'll address that separately.

@Kontrabant
Kontrabant deleted the wl_offer_destroy branch July 22, 2026 16:11
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.

Wayland: memory corruption when sending clipboard data

2 participants