Skip to content

Clipboard handling? #162

Closed
Closed

Description

@ozkriff
No description provided.

Activity

  1. added
    S - api
    on Apr 19, 2017
  2. ozkriff commented on Apr 22, 2017

    @ozkriff
    ContributorAuthor
  3. added
    S - enhancement
    H - help wanted
    D - hard
    P - normal
    on May 6, 2018
  4. torkleyy commented on May 23, 2018

    @torkleyy

    I think the clipboard crate works just fine for this, no reason to integrate it into winit, is there?

  5. quininer commented on May 23, 2018

    @quininer

    @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.

  6. torkleyy commented on May 23, 2018

    @torkleyy

    Ah I see, thanks!

  7. elinorbgr commented on Aug 25, 2018

    @elinorbgr
    Contributor

    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
  8. trimental commented on Aug 26, 2018

    @trimental
    Contributor

    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.

  9. chrisduerr commented on Feb 8, 2019

    @chrisduerr
    Contributor

    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.

  10. chrisduerr commented on Feb 10, 2019

    @chrisduerr
    Contributor

    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

  11. madsmtm commented on Jan 27, 2022

    @madsmtm
    Member

    We're discussing this again in #2156, for the people following this issue, feel free to drop by and give input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    D - hardH - help wantedP - normalS - apiS - enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions