History

video/out/wayland_common: implement VOCTRL_GET_CLIPBOARD

This adds support for VOCTRL_GET_CLIPBOARD which makes the VO clipboard backend be able to get clipboard content for Wayland.

nanahi committed 1 year ago

Commit d47ce381 parent b93d3041 file · +9 −0Browse files

Unified · Split

video/out/wayland_common.c+9−0
@@ -3021,6 +3021,15 @@ int vo_wayland_control(struct vo *vo, int *events, int request, void *arg) · 3020 unmodified lines
3021 return set_screensaver_inhibitor(wl, true);3021 return set_screensaver_inhibitor(wl, true);
3022 case VOCTRL_RESTORE_SCREENSAVER:3022 case VOCTRL_RESTORE_SCREENSAVER:
3023 return set_screensaver_inhibitor(wl, false);3023 return set_screensaver_inhibitor(wl, false);
3024 case VOCTRL_GET_CLIPBOARD: {
3025 struct voctrl_clipboard *vc = arg;
3026 // TODO: add primary selection support
3027 if (vc->params.target != CLIPBOARD_TARGET_CLIPBOARD || vc->params.type != CLIPBOARD_DATA_TEXT)
3028 return VO_NOTAVAIL;
3029 vc->data.type = CLIPBOARD_DATA_TEXT;
3030 vc->data.u.text = bstrto0(vc->talloc_ctx, wl->selection_text);
3031 return VO_TRUE;
3032 }
3024 }3033 }
3025 3034
3026 return VO_NOTIMPL;3035 return VO_NOTIMPL;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t