Skip to content

Commit ad18e5c

Browse files
committed
support raw XCB handles
1 parent d84e793 commit ad18e5c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/backend/vulkan/src/window.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,16 @@ impl Instance {
341341
{
342342
Ok(self.create_surface_from_xlib(handle.display as *mut _, handle.window))
343343
}
344+
#[cfg(all(
345+
feature = "xcb",
346+
unix,
347+
not(target_os = "android"),
348+
not(target_os = "macos"),
349+
not(target_os = "ios")
350+
))]
351+
RawWindowHandle::Xcb(handle) if self.extensions.contains(&khr::XcbSurface::name()) => {
352+
Ok(self.create_surface_from_xcb(handle.connection as *mut _, handle.window))
353+
}
344354
// #[cfg(target_os = "android")]
345355
// RawWindowHandle::ANativeWindowHandle(handle) => {
346356
// let native_window = unimplemented!();

0 commit comments

Comments
 (0)