1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Linux clipboard-persistence regression: a copy that reports success must
//! leave the text retrievable afterwards, without depending on a desktop
//! clipboard manager being installed.
//!
//! Reproduces the LXQt/Openbox failure mode where `copy_to_clipboard` created
//! an `arboard::Clipboard`, wrote, and dropped it on return: on X11 the
//! clipboard is served by the owning process, so destroying the instance
//! destroys the data whenever no `CLIPBOARD_MANAGER` took it over within
//! arboard's 100ms handoff window. Windows and macOS keep OS-owned clipboards,
//! so the same transient pattern passed there.
//!
//! Proof boundary: on a headless machine (no X11/Wayland server) the copy
//! itself fails and this probe skips — the persistence contract needs a live
//! display server. Where a clipboard manager IS installed, the old code could
//! survive via the manager handoff, so this probe must be run (and was) on a
//! manager-less X11 session.
use *;
// Manual live-desktop harness, not a CI probe: with RPI_CLIP_LIVE_TEST=1 it
// copies and then serves the selection for 20s so an OUT-OF-PROCESS reader
// (e.g. `xclip -o -selection clipboard`) can verify persistence on a real
// X11/Wayland session. Skipped everywhere else; the in-process read-back in
// `copied_text_survives_copy_to_clipboard_returning` is the automated check.