X11: set XlibWindowHandle.window and XlibDisplayhandle.display
This commit is contained in:
parent
eb94b4d7ab
commit
6f32584149
|
@ -690,8 +690,9 @@ impl Window {
|
|||
unsafe impl HasRawWindowHandle for Window {
|
||||
fn raw_window_handle(&self) -> RawWindowHandle {
|
||||
let mut handle = XlibWindowHandle::empty();
|
||||
|
||||
handle.window = self.window_id as c_ulong;
|
||||
handle.display = self.xcb_connection.conn.get_raw_dpy() as *mut c_void;
|
||||
// FIXME: handle.visual_id?
|
||||
|
||||
RawWindowHandle::Xlib(handle)
|
||||
}
|
||||
|
@ -699,7 +700,12 @@ unsafe impl HasRawWindowHandle for Window {
|
|||
|
||||
unsafe impl HasRawDisplayHandle for Window {
|
||||
fn raw_display_handle(&self) -> RawDisplayHandle {
|
||||
RawDisplayHandle::Xlib(XlibDisplayHandle::empty())
|
||||
let mut handle = XlibDisplayHandle::empty();
|
||||
|
||||
handle.display = self.xcb_connection.conn.get_raw_dpy() as *mut c_void;
|
||||
// FIXME: handle.screen?
|
||||
|
||||
RawDisplayHandle::Xlib(handle)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue