Skip to content

Use winit's new clipboard API instead of copypasta#5793

Closed
kchibisov wants to merge 1 commit intoalacritty:masterfrom
kchibisov:new-winit-clipboard
Closed

Use winit's new clipboard API instead of copypasta#5793
kchibisov wants to merge 1 commit intoalacritty:masterfrom
kchibisov:new-winit-clipboard

Conversation

@kchibisov
Copy link
Copy Markdown
Member

This commit makes alacritty use new winit clipboard API instead of
relying on copypasta provider, which proved to be poor option when it
comes to performance and stability.

Fixes #5050.
Fixes #3601.
Fixes #3108.
Fixes #2811.
Fixes #2735.
Fixes #2453.

This commit makes alacritty use new winit clipboard API instead of
relying on copypasta provider, which proved to be poor option when it
comes to performance and stability.

Fixes alacritty#5050.
Fixes alacritty#3601.
Fixes alacritty#3108.
Fixes alacritty#2811.
Fixes alacritty#2735.
Fixes alacritty#2453.
Comment on lines +387 to +389
mimes.insert(String::from("text/plain;charset=utf-8"));
mimes.insert(String::from("text/plain"));
mimes.insert(String::from("UTF8_STRING"));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it might be convenient for winit to do this for me? Chances are these mimes are going to be very common.

Maybe either a set_text function or some helper to get the "normal text" mimes?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mime types are hard since you need a strategy to pick one of offered and provide your data with mime type you've offered. For example you can serve image and text at the same time. So you need a callback to decide how to represent your data.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, winit could provide a helpers for mime type handling. Im just not sure how they should look.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just feel like the majority of clients will likely always write text only.

@kchibisov kchibisov added this to the Version 0.11.0 milestone Jan 28, 2022
@perfbot
Copy link
Copy Markdown

perfbot commented Feb 1, 2022

results

@kitt-cat
Copy link
Copy Markdown

hello, just wondering if there's any chance this could make it into version 0.12.0?

@kchibisov
Copy link
Copy Markdown
Member Author

hello, just wondering if there's any chance this could make it into version 0.12.0?

This one for sure no, it's a prototype for me to simplify testing stuff upstream. It'll be implemented eventually, it'll just require a lot of effort, and not only from my side to finish(need to implement Wayland, X11, macOS, windows, and I can really provide Wayland only)...

@kchibisov
Copy link
Copy Markdown
Member Author

Lots of said issues were fixed already on master and winit will have its clipboard API not really soon.

@kchibisov kchibisov closed this Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants