From 1ea29b4de069e3f1f439449ad2c14c25ce177cea Mon Sep 17 00:00:00 2001 From: Riku Salminen Date: Tue, 9 Jul 2019 13:02:02 +0300 Subject: [PATCH] x11: NewEvents(StartCause::Init) callback at start Before starting the event loop, invoke callback with NewEvents(StartCause::Init). --- src/platform_impl/linux/x11/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platform_impl/linux/x11/mod.rs b/src/platform_impl/linux/x11/mod.rs index ba61e719..329d5f8e 100644 --- a/src/platform_impl/linux/x11/mod.rs +++ b/src/platform_impl/linux/x11/mod.rs @@ -249,6 +249,12 @@ impl EventLoop { 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 {