@@ -171,6 +171,7 @@ impl EventLoop {
171171 }
172172
173173 fn handle_coalesced_resize_events ( & mut self ) -> Result < ( ) , FatalError > {
174+ let mut comes_from_parent = false ;
174175 if let Some ( new_parent_size) = self . new_parent_size . take ( ) {
175176 if new_parent_size != self . window . get_size ( ) {
176177 // The parent was resized, which means we should resize ourselves too.
@@ -180,6 +181,7 @@ impl EventLoop {
180181 // Makes the rest of this function run on the new parent size immediately (without waiting for a ConfigureNotify round-trip)
181182 // Also overrides any new sizes we may have received this event loop iteration,it would probably be invalidated anyway
182183 self . new_size = Some ( new_parent_size) ;
184+ comes_from_parent = true ;
183185 }
184186 }
185187 }
@@ -198,21 +200,24 @@ impl EventLoop {
198200 warn ! ( "Window Handler failed to resize: {}" , e) ;
199201 self . window . store_size ( previous) ;
200202 self . window . xcb_window . resize ( previous. cast ( ) ) ?. check_warn ( ) ;
201- } else {
202- // Host requests use resize_immediately, which stops the previous == new_size condition
203- // So if we're here, it's guaranteed not to be from a host request
203+ return Ok ( ( ) ) ;
204+ }
205+
206+ // Host requests use resize_immediately, which stops the previous == new_size condition
207+ // So if we're here, it's guaranteed not to be from a host request
204208
209+ if !comes_from_parent {
205210 if let Some ( host) = self . main_thread . as_mut ( ) {
206211 host. send ( HostCallback :: Resized {
207212 new_size,
208213 previous : WindowSize :: from_physical ( previous. cast ( ) , scale_factor) ,
209214 } ) ?;
210215 }
211-
212- // Immediately schedule a redraw, do not wait for an "expose" event
213- self . exposed = true ;
214216 }
215217
218+ // Immediately schedule a redraw, do not wait for an "expose" event
219+ self . exposed = true ;
220+
216221 Ok ( ( ) )
217222 }
218223
0 commit comments