Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add visual IDs to X11 handles #83

Merged
merged 1 commit into from Dec 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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