You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@torkleyy At least within the x11, there is advantage in integrate the clipboard into winit. This will avoid create redundant window and additional event loops.
For the record, on wayland clipboard handling is linked to keyboard focus, and cannot be done from an external crate independently of winit. As such, clipboard support in wayland would require either:
to be fully implemented in winit
or that winit expose a significant part of its internals (its SCTK inner) in the platform-specific part of the API
After some testing I've found that the clipboard can be accessed from wayland with the current winit methods without any needed change. Its a bit tedious but you can use Display::from_external_display() to access an EventQueue which can be used to create an Environment object; which can be used to make a WlSeat object; which can be used to make a DataDevice object which can access the clipboard.
Since @trimental did some great pathfinding in Alacritty to support this as an external crate, I'd propose closing this issue since @Osspial has mentioned that the tendency is to declare this out of scope.
I think it should be possible to provide this to all winit users without actually having to integrate it directly into winit. That would remove strain from the winit project and I think that since Alacritty is already maintaining a clipboard library, it shouldn't be too much of an issue.
And of course since this would be completely disconnected from Alacritty itself (hopefully), nothing should stop people from contributing to the clipboard library too. The only potential risk I can see is that Alacritty would be 'in control', however hopefully that shouldn't be an issue.
I've also looked into making use of a more standardized crate like clipboard from servo and I think there are a lot of options, but all of them would benefit from a definite decision to mark this either in, or out of scope.
Of course I don't want to monopolize this as something Alacritty will resolve, I'm just offering this as a potential solution. If there are others interested in branching off, it shouldn't keep them from implementing alternatives either.
Reacted by Nathan Lilienthal and Osspial
Reacted by Nathan Lilienthal and Francesca Lovebloom
Activity
ozkriff commentedon Apr 22, 2017
https://docs.rs/clipboard may help
torkleyy commentedon May 23, 2018
I think the
clipboardcrate works just fine for this, no reason to integrate it intowinit, is there?quininer commentedon May 23, 2018
@torkleyy At least within the x11, there is advantage in integrate the clipboard into winit. This will avoid create redundant window and additional event loops.
torkleyy commentedon May 23, 2018
Ah I see, thanks!
elinorbgr commentedon Aug 25, 2018
For the record, on wayland clipboard handling is linked to keyboard focus, and cannot be done from an external crate independently of winit. As such, clipboard support in wayland would require either:
trimental commentedon Aug 26, 2018
After some testing I've found that the clipboard can be accessed from wayland with the current winit methods without any needed change. Its a bit tedious but you can use
Display::from_external_display()to access anEventQueuewhich can be used to create anEnvironmentobject; which can be used to make aWlSeatobject; which can be used to make aDataDeviceobject which can access the clipboard.chrisduerr commentedon Feb 8, 2019
Since @trimental did some great pathfinding in Alacritty to support this as an external crate, I'd propose closing this issue since @Osspial has mentioned that the tendency is to declare this out of scope.
I think it should be possible to provide this to all winit users without actually having to integrate it directly into winit. That would remove strain from the winit project and I think that since Alacritty is already maintaining a clipboard library, it shouldn't be too much of an issue.
And of course since this would be completely disconnected from Alacritty itself (hopefully), nothing should stop people from contributing to the clipboard library too. The only potential risk I can see is that Alacritty would be 'in control', however hopefully that shouldn't be an issue.
I've also looked into making use of a more standardized crate like clipboard from servo and I think there are a lot of options, but all of them would benefit from a definite decision to mark this either in, or out of scope.
Of course I don't want to monopolize this as something Alacritty will resolve, I'm just offering this as a potential solution. If there are others interested in branching off, it shouldn't keep them from implementing alternatives either.
chrisduerr commentedon Feb 10, 2019
For everyone interested, an initial version of a potential wayland clipboard solution can be found here (100% of the credit goes to trimental for his great work):
https://github.com/Smithay/wayland-clipboard
madsmtm commentedon Jan 27, 2022
We're discussing this again in #2156, for the people following this issue, feel free to drop by and give input!
feat(tray): Support macOS icon template (rust-windowing#162)