-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2 update with availble types performance tweaks #49
base: v2
Are you sure you want to change the base?
Conversation
Dropping this for now, until I can get a "clean" implementation working with yarn and pnpm |
I ended up creating another branch in my fork to support pre-release yarn builds. |
I agree this this more convenient, but not sure if i'ts a good idea to run Have you tested the delay cost of adding 5 extra |
Maybe we can implement a tauri command to get all available types at once instead of calling Or a separate monitor function with available types. |
I'll do some benchmarking. I took another look and there's function in clipboard-rs called "available_formats" that appears to return all of the formats in one call. If that's the case, we can leverage that, and I think it should be a win-win. |
src/desktop.rs
Outdated
let mut image = false; | ||
let mut files = false; | ||
|
||
for format in formats { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these formats consistent on all three platforms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh... you're absolutely right. These have to be mapped "upstream" in clipboard_rs. I can do it for Windows and Linux but I need to get my hands on a Mac, and then I need to work with the clipboard-rs to get that merged in - I just submitted a fix to X11 clipboard images and the maintainer is easy to work with. This will probably take a week or two. I'm thinking I"ll have to add a "get_formats" call in that project that will do the mapping. This has turned into a "pull the string on a sweater" exercise but it's probably worth doing. I'll ping you once I finish things on the clipboard-rs end.
This PR includes the clipboard-rs 0.2.1 support for disabling the Linux clipboard timeout, and the following: