mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 23:23:14 -04:00
X11: Fix events not being reported when using run_return (#1245)
* X11: Fix events not being reported using `run_return` * Adapt examples to be more practical * Add CHANGELOG entry
This commit is contained in:
@@ -66,6 +66,13 @@ impl<T: 'static> EventProcessor<T> {
|
||||
self.with_window(window_id, |_| ()).is_some()
|
||||
}
|
||||
|
||||
pub(super) fn poll(&self) -> bool {
|
||||
let wt = get_xtarget(&self.target);
|
||||
let result = unsafe { (wt.xconn.xlib.XPending)(wt.xconn.display) };
|
||||
|
||||
result != 0
|
||||
}
|
||||
|
||||
pub(super) unsafe fn poll_one_event(&mut self, event_ptr: *mut ffi::XEvent) -> bool {
|
||||
let wt = get_xtarget(&self.target);
|
||||
// This function is used to poll and remove a single event
|
||||
|
||||
Reference in New Issue
Block a user