Implement _NET_WM_PING for X11 (#977)

This commit is contained in:
Ho-Yon Mak 2019-06-28 01:40:27 +01:00 committed by Hal Gentz
parent dd38fab2f3
commit 23354cf1a5
4 changed files with 18 additions and 2 deletions

View file

@ -46,6 +46,7 @@ use crate::{
pub struct EventLoopWindowTarget<T> {
xconn: Arc<XConnection>,
wm_delete_window: ffi::Atom,
net_wm_ping: ffi::Atom,
ime_sender: ImeSender,
root: ffi::Window,
ime: RefCell<Ime>,
@ -75,6 +76,8 @@ impl<T: 'static> EventLoop<T> {
let wm_delete_window = unsafe { xconn.get_atom_unchecked(b"WM_DELETE_WINDOW\0") };
let net_wm_ping = unsafe { xconn.get_atom_unchecked(b"_NET_WM_PING\0") };
let dnd = Dnd::new(Arc::clone(&xconn))
.expect("Failed to call XInternAtoms when initializing drag and drop");
@ -142,6 +145,7 @@ impl<T: 'static> EventLoop<T> {
ime_sender,
xconn,
wm_delete_window,
net_wm_ping,
pending_redraws: Default::default(),
}),
_marker: ::std::marker::PhantomData,