mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
x11: NewEvents(StartCause::Init) callback at start
Before starting the event loop, invoke callback with NewEvents(StartCause::Init).
This commit is contained in:
@@ -249,6 +249,12 @@ impl<T: 'static> EventLoop<T> {
|
||||
let mut control_flow = ControlFlow::default();
|
||||
let wt = get_xtarget(&self.target);
|
||||
|
||||
callback(
|
||||
crate::event::Event::NewEvents(crate::event::StartCause::Init),
|
||||
&self.target,
|
||||
&mut control_flow,
|
||||
);
|
||||
|
||||
loop {
|
||||
// Empty the event buffer
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user