Skip to content

Support for wayland clipboard for applications with a window #207

@Ciubix8513

Description

@Ciubix8513

According to wl_clipboard_rs that crate should not be used for applications that have a window, instead it recommends using smithay-clipboard. I suggest a new api be added that supports that, for example:

let display_handle = ...; 

let mut clipboard = Clipboard::with_wl_surface( display_handle); 

Alternatively, most people will likely be using winit to handle creating and managing a window, so it could be used as an optional dependency, and have api something like:

let mut clipboard = Clipboard::with_window(&window);

In this example Clipboard itself could detect whether or not it's running on wayland and decide whether to use the window handle.

Implementing this will allow the application to work on more compositors, without the need to resort to xwayland.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions