Skip to content

Commit

Permalink
Add visual IDs to X11 handles
Browse files Browse the repository at this point in the history
Needed for Vulkan physical device presentation support queries.
  • Loading branch information
Ralith committed Dec 3, 2021
1 parent 9572ac8 commit 367fc6d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/unix.rs
Expand Up @@ -18,6 +18,8 @@ pub struct XlibHandle {
pub window: c_ulong,
/// A pointer to an Xlib `Display`.
pub display: *mut c_void,
/// An Xlib visual ID, or 0 if unknown.
pub visual_id: c_ulong,
}

/// Raw window handle for Xcb.
Expand All @@ -35,6 +37,8 @@ pub struct XcbHandle {
pub window: u32, // Based on xproto.h
/// A pointer to an X server `xcb_connection_t`.
pub connection: *mut c_void,
/// An X11 `xcb_visualid_t`, or 0 if unknown.
pub visual_id: u32,
}

/// Raw window handle for Wayland.
Expand All @@ -59,6 +63,7 @@ impl XlibHandle {
Self {
window: 0,
display: ptr::null_mut(),
visual_id: 0,
}
}
}
Expand All @@ -68,6 +73,7 @@ impl XcbHandle {
Self {
window: 0,
connection: ptr::null_mut(),
visual_id: 0,
}
}
}
Expand Down

0 comments on commit 367fc6d

Please sign in to comment.