Closed leb-kuchen closed 5 months ago
Thanks for the contribution, i will try to review
The PR looks good otherwise.
I plan to add a window to list all settings. In the meantime, i would prefer is the applet was not to cluttered, so please, can you remove the toggle ?
Edit: incognito should be a quick settings anyway, so i guess we can leave the toggle for now. Maybe in the future, we could open a quick settings page when we right-click the icon.
Also, it seems that activate incognito stop the copy of elements to works. This will not block the merge but maybe you know how to fix it.
If you comment out output.send(ClipboardMessage::Data(data)).await.unwrap();
( line 62), you cannot copy. The pipe reader is probably behind some mutex or is not not dropped.
Idk, it's weird, it's like the source of to clipboard get automatically dropped:
[src/clipboard.rs:92:5] "copy" = "copy"
[src/clipboard.rs:92:5] &data = Data {
creation: 1712669578196,
mime: "text/plain;charset=utf-8",
value: "send",
}
on_close_requested
[2024-04-09T13:42:33Z INFO wl_clipboard_rs::paste_watch] keyboard is empty
[2024-04-09T13:42:33Z ERROR cosmic_clipboard_manager::clipboard] watch clipboard error: The clipboard of the requested seat is empty
But the copy function work well if incognito is disabled:
[src/clipboard.rs:92:5] "copy" = "copy"
[src/clipboard.rs:92:5] &data = Data {
creation: 1712669578196,
mime: "text/plain;charset=utf-8",
value: "send",
}
[2024-04-09T13:49:05Z INFO cosmic_clipboard_manager::clipboard] sending data to database: Data { creation: 1712670545966, mime: "text/plain;charset=utf-8", value: "send" }
That make no sense to me
What's weird it that the error happens in the start_watching function, where no code has been changed.
This is the real error: ERROR wl_clipboard_rs::copy] Paste(Copy(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }))
It it just calling db insert and weird things are happening there.
I guess start watching listens for the copy, because it is also a clipboard event.
This should do it, the only real data there still is the last creation date, though you could also fake it, but this will likely cause problems. I also made adjustments to the padding of the clear button and the width of the search input, if you don't mind it.
I fixed it in clipboard-rs. Thank again for the contribution
Quick and easy solution.