From dcfc988047fa13f55b4f0885c51a45c516e014e1 Mon Sep 17 00:00:00 2001 From: Billy Messenger Date: Sat, 5 Sep 2020 16:29:47 -0500 Subject: [PATCH] Change raw_handle to use an Xlib handle instead of an Xcb handle --- src/x11/window.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/x11/window.rs b/src/x11/window.rs index 8975fda..03366a0 100644 --- a/src/x11/window.rs +++ b/src/x11/window.rs @@ -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 Window { 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, };