Remote: copy from the phone to this device's clipboard
CI / test (pull_request) Successful in 1m22s

- Web UI: Ctrl+C, Ctrl+X, Ctrl+Shift+C (Cmd+C on Mac) also put what they copied, text or PNG, on this device's clipboard; Copy, Copy Selection and Copy Clipboard buttons
- chandra-remote: GET /api/clipboard/data, with the same authorization as the upload
- Compositor: clipboard-get-fd has the clipboard's owner write into a pipe, refused while locked; input-copy presses Ctrl+Shift+C in terminals, Ctrl+C elsewhere
- Pending clipboard transfers keep the main loop awake

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-11-30 18:26:53 -08:00
1 parent c5dbe028e6
commit 589d167f79
11 files changed
+552 -19

No files matched your search

+7
View File
@@ -84,6 +84,13 @@ int ctl_fire(CtlConn *c, const char *line);
clipboard serial goes to `serial` (may be NULL). 0, or -1 when the compositor refused. */
int remote_clipboard_set(CtlConn *c, const char *mime, const void *data, size_t len,
unsigned long *serial);
enum {
REMOTE_CLIP_OK, REMOTE_CLIP_FAILED, REMOTE_CLIP_EMPTY, REMOTE_CLIP_LOCKED, REMOTE_CLIP_OLD,
REMOTE_CLIP_TOO_LARGE
};
/* The phone's clipboard: its Content-Type (static), bytes (the caller frees) and serial. */
int remote_clipboard_get(CtlConn *c, const char **mime, uint8_t **data, size_t *len,
unsigned long *serial);
/* Current clipboard serial: it changes whenever something is put on the clipboard. */
int remote_clipboard_serial(CtlConn *c, unsigned long *serial);
void remote_osk_suppress_acquire(RemoteApp *app, int *client_flag);