X11: provide XlibWindowHandle.visual_id
This commit is contained in:
parent
4130502a2a
commit
0df43486ba
|
@ -96,6 +96,7 @@ pub struct Window {
|
||||||
xcb_connection: XcbConnection,
|
xcb_connection: XcbConnection,
|
||||||
window_id: u32,
|
window_id: u32,
|
||||||
window_info: WindowInfo,
|
window_info: WindowInfo,
|
||||||
|
visual_id: u32,
|
||||||
// FIXME: There's all this mouse cursor logic but it's never actually used, is this correct?
|
// FIXME: There's all this mouse cursor logic but it's never actually used, is this correct?
|
||||||
mouse_cursor: MouseCursor,
|
mouse_cursor: MouseCursor,
|
||||||
|
|
||||||
|
@ -336,6 +337,7 @@ impl Window {
|
||||||
xcb_connection,
|
xcb_connection,
|
||||||
window_id,
|
window_id,
|
||||||
window_info,
|
window_info,
|
||||||
|
visual_id: visual,
|
||||||
mouse_cursor: MouseCursor::default(),
|
mouse_cursor: MouseCursor::default(),
|
||||||
|
|
||||||
frame_interval: Duration::from_millis(15),
|
frame_interval: Duration::from_millis(15),
|
||||||
|
@ -685,7 +687,9 @@ impl Window {
|
||||||
unsafe impl HasRawWindowHandle for Window {
|
unsafe impl HasRawWindowHandle for Window {
|
||||||
fn raw_window_handle(&self) -> RawWindowHandle {
|
fn raw_window_handle(&self) -> RawWindowHandle {
|
||||||
let mut handle = XlibWindowHandle::empty();
|
let mut handle = XlibWindowHandle::empty();
|
||||||
handle.window = self.window_id as c_ulong;
|
|
||||||
|
handle.window = self.window_id.into();
|
||||||
|
handle.visual_id = self.visual_id.into();
|
||||||
|
|
||||||
RawWindowHandle::Xlib(handle)
|
RawWindowHandle::Xlib(handle)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue