Skip to content

wayland: support clipboard writing#16234

Merged
Dudemanguy merged 6 commits intompv-player:masterfrom
na-na-hi:wayland-clipboard-write
Apr 22, 2025
Merged

wayland: support clipboard writing#16234
Dudemanguy merged 6 commits intompv-player:masterfrom
na-na-hi:wayland-clipboard-write

Conversation

@na-na-hi
Copy link
Copy Markdown
Contributor

This makes writing to clipboard property work on both the Wayland VO backend and ext-data-control-v1 backend.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 12, 2025

@guidocella
Copy link
Copy Markdown
Contributor

In the wayland backend writing seems to conflict with wl-clip-persist. With it running the clipboard is only updated after copying something else outside of mpv or opening the clipboard manager 2 times.

@llyyr
Copy link
Copy Markdown
Contributor

llyyr commented Apr 13, 2025

Could you move clipboard-wayland: read already sent data when the fd is hung up to it's own PR? This is purely a bug fix and shouldn't be held here until someone reviews the rest of the PR. That commit specifically lgtm

@na-na-hi
Copy link
Copy Markdown
Contributor Author

In the wayland backend writing seems to conflict with wl-clip-persist. With it running the clipboard is only updated after copying something else outside of mpv or opening the clipboard manager 2 times.

Right now other clients won't know when mpv updates the clipboard content. This requires changing the way writing is handled, will do that later.

Could you move clipboard-wayland: read already sent data when the fd is hung up to it's own PR? This is purely a bug fix and shouldn't be held here until someone reviews the rest of the PR. That commit specifically lgtm

Done.

@Dudemanguy Dudemanguy self-requested a review April 14, 2025 00:23
Comment thread player/clipboard/clipboard-wayland.c Outdated
Comment thread video/out/wayland_common.c
This is required for setting selection for clipboard writing.
The data device is used for both dnd and clipboard, so change it to
a better name.
@na-na-hi na-na-hi force-pushed the wayland-clipboard-write branch from d2cb193 to 9bbbec8 Compare April 15, 2025 02:43
Comment thread player/clipboard/clipboard-wayland.c Outdated
Comment thread player/clipboard/clipboard-wayland.c
Comment thread player/clipboard/clipboard-wayland.c
Comment thread player/clipboard/clipboard-wayland.c Outdated
This adds clipboard writing support for the VO clipboard backend
when a Wayland VO is active for the wayland core protocol.
This adds clipboard writing support for the native Wayland clipboard
backend for the ext-data-control-v1 protocol. Both clipboard and
primary selection are supported.
Wayland clipboard writing is added. macOS clipboard writing was
already implemented but it was forgotten to update the documentation.
@na-na-hi na-na-hi force-pushed the wayland-clipboard-write branch from 9bbbec8 to 67bd081 Compare April 17, 2025 05:54
@na-na-hi na-na-hi force-pushed the wayland-clipboard-write branch from 33a761c to 85a8709 Compare April 17, 2025 06:13
Copy link
Copy Markdown
Member

@Dudemanguy Dudemanguy left a comment

Choose a reason for hiding this comment

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

Works on my end.

@llyyr
Copy link
Copy Markdown
Contributor

llyyr commented Apr 21, 2025

Could you squash wayland: print errno strerror for data offer read/write into the original commits? Not sure why it needs to be a different commit

@Dudemanguy
Copy link
Copy Markdown
Member

It's fine imo. It technically modifies another part.

@Dudemanguy Dudemanguy merged commit f147df1 into mpv-player:master Apr 22, 2025
29 checks passed
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.

5 participants