1
0
Fork 0

Change raw_handle to use an Xlib handle instead of an Xcb handle

This commit is contained in:
Billy Messenger 2020-09-05 16:29:47 -05:00
parent c7d9d7d107
commit dcfc988047

View file

@ -1,5 +1,5 @@
use std::ffi::CStr;
use std::os::raw::c_void;
use std::os::raw::{c_ulong, c_void};
use std::sync::mpsc;
use ::x11::xlib;
@ -128,10 +128,12 @@ impl<A: AppWindow> Window<A> {
xlib::XSync(xcb_connection.conn.get_raw_dpy(), xlib::False);
}
let raw_handle = RawWindowHandle::Xcb(raw_window_handle::unix::XcbHandle {
connection: xcb_connection.conn.get_raw_conn() as *mut c_void,
..raw_window_handle::unix::XcbHandle::empty()
let raw_handle = RawWindowHandle::Xlib(raw_window_handle::unix::XlibHandle {
window: window_id as c_ulong,
display: xcb_connection.conn.get_raw_dpy() as *mut c_void,
..raw_window_handle::unix::XlibHandle::empty()
});
let raw_window = RawWindow {
raw_window_handle: raw_handle,
};