Update raw-window-handle to v0.5

Update raw-window-handle to v0.5. This mainly consisted of using the
newly added RawDisplayHandle trait instead of the previously used
RawWindowHandle trait. For the Linux implementation, this also included
updating winit to v0.27
This commit is contained in:
TobTobXX 2022-07-27 15:02:43 +02:00
parent c97306d269
commit 1392da8339
No known key found for this signature in database
GPG key ID: 12AC3D4752E2FA2E
8 changed files with 18 additions and 18 deletions

View file

@ -1,16 +1,16 @@
use crate::ClipboardProvider;
use raw_window_handle::{HasRawWindowHandle, RawWindowHandle};
use raw_window_handle::{HasRawDisplayHandle, RawDisplayHandle};
use std::error::Error;
pub use clipboard_wayland as wayland;
pub use clipboard_x11 as x11;
pub fn connect<W: HasRawWindowHandle>(
pub fn connect<W: HasRawDisplayHandle>(
window: &W,
) -> Result<Box<dyn ClipboardProvider>, Box<dyn Error>> {
let clipboard = match window.raw_window_handle() {
RawWindowHandle::Wayland(handle) => {
let clipboard = match window.raw_display_handle() {
RawDisplayHandle::Wayland(handle) => {
assert!(!handle.display.is_null());
Box::new(unsafe {