Commit eccbad6
committed
fix(clipboard): improve image read robustness on Wayland
- Add MIME type negotiation: try image/png then jpeg/webp/bmp/gif/tiff
- Fix stream-drain race in runCaptureBytes: join reader thread fully after
process exit (was capped at 200ms, could truncate large images)
- Add fallback: read image files directly from disk when clipboard contains
file URIs (Nautilus copy on .png files)
- Bump image read timeout to 5 seconds (screenshots may take time)
- Demo: display image thumbnails inline in the event log when images are
copied or read
- Add WaylandImageSmokeTest integration test1 parent a33c442 commit eccbad6
3 files changed
Lines changed: 126 additions & 11 deletions
File tree
- clipboard-linux/src
- main/kotlin/io/github/kdroidfilter/nucleus/clipboard/linux
- test/kotlin/io/github/kdroidfilter/nucleus/clipboard/linux
- example/src/main/kotlin/com/example/demo
Lines changed: 46 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
111 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
112 | 152 | | |
113 | 153 | | |
114 | 154 | | |
| |||
226 | 266 | | |
227 | 267 | | |
228 | 268 | | |
229 | | - | |
| 269 | + | |
230 | 270 | | |
231 | 271 | | |
232 | | - | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
233 | 275 | | |
234 | 276 | | |
235 | 277 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
Lines changed: 59 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
52 | 60 | | |
53 | 61 | | |
54 | 62 | | |
55 | 63 | | |
56 | | - | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
60 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
61 | 78 | | |
62 | 79 | | |
63 | 80 | | |
| |||
80 | 97 | | |
81 | 98 | | |
82 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
83 | 110 | | |
84 | 111 | | |
85 | 112 | | |
| |||
172 | 199 | | |
173 | 200 | | |
174 | 201 | | |
175 | | - | |
| 202 | + | |
176 | 203 | | |
177 | 204 | | |
178 | 205 | | |
| |||
181 | 208 | | |
182 | 209 | | |
183 | 210 | | |
184 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
185 | 217 | | |
186 | 218 | | |
187 | 219 | | |
| |||
374 | 406 | | |
375 | 407 | | |
376 | 408 | | |
377 | | - | |
| 409 | + | |
378 | 410 | | |
379 | 411 | | |
380 | 412 | | |
| |||
387 | 419 | | |
388 | 420 | | |
389 | 421 | | |
390 | | - | |
391 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
392 | 444 | | |
393 | 445 | | |
394 | 446 | | |
| |||
0 commit comments