x11: Add XCB support to the X11 backend (#52)

This commit is contained in:
John Nunley 2022-12-27 09:14:54 -08:00 committed by GitHub
parent d5bb2c1c78
commit 3eeafad834
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 296 additions and 81 deletions

View file

@ -110,7 +110,14 @@ impl GraphicsContext {
RawWindowHandle::Xlib(xlib_window_handle),
RawDisplayHandle::Xlib(xlib_display_handle),
) => Dispatch::X11(unsafe {
x11::X11Impl::new(xlib_window_handle, xlib_display_handle)?
x11::X11Impl::from_xlib(xlib_window_handle, xlib_display_handle)?
}),
#[cfg(all(feature = "x11", any(target_os = "linux", target_os = "freebsd")))]
(
RawWindowHandle::Xcb(xcb_window_handle),
RawDisplayHandle::Xcb(xcb_display_handle),
) => Dispatch::X11(unsafe {
x11::X11Impl::from_xcb(xcb_window_handle, xcb_display_handle)?
}),
#[cfg(all(feature = "wayland", any(target_os = "linux", target_os = "freebsd")))]
(