-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add primary clipboard support for X11 and wayland #25
Conversation
The X11 code already had the functionality. Just didn't expose it. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
PR to add support in |
@hecrj would it be possible to get this fix in? I currently have patches for iced and cosmic-term to get support for primary. |
fn read_primary(&self) -> Option<Result<String, Box<dyn Error>>> { | ||
None | ||
} | ||
|
||
fn write_primary(&mut self, _contents: String) -> Option<Result<(), Box<dyn Error>>> { | ||
None | ||
} |
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.
Can we make these available only on Linux?
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.
Both me and @MoSal created a fix for this, I choose to expose this for unix only, but that is really not very nice to have in the api, since that leaks up all the way through iced to applications trying to use this. So, even if it is more technically correct to only expose this for unix systems, it is much more clean and user friendly with this implementation that have a default implementation that returns None on systems without primary.
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.
Fair enough!
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.
Thanks!
The X11 code already had the functionality. Just didn't expose it.