File tree 2 files changed +12
-10
lines changed
core/tauri-runtime-wry/src
2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " tauri-runtime-wry " : patch:bug
3
+ ---
4
+
5
+ Fixes redraw tracing span not closing.
Original file line number Diff line number Diff line change @@ -248,14 +248,11 @@ pub struct ActiveTraceSpanStore(Rc<RefCell<Vec<ActiveTracingSpan>>>);
248
248
249
249
#[ cfg( feature = "tracing" ) ]
250
250
impl ActiveTraceSpanStore {
251
- pub fn remove_window_draw ( & self , window_id : WindowId ) {
252
- let mut store = self . 0 . borrow_mut ( ) ;
253
- if let Some ( index) = store
254
- . iter ( )
255
- . position ( |t| matches ! ( t, ActiveTracingSpan :: WindowDraw { id, span: _ } if id == & window_id) )
256
- {
257
- store. remove ( index) ;
258
- }
251
+ pub fn remove_window_draw ( & self ) {
252
+ self
253
+ . 0
254
+ . borrow_mut ( )
255
+ . retain ( |t| !matches ! ( t, ActiveTracingSpan :: WindowDraw { id: _, span: _ } ) ) ;
259
256
}
260
257
}
261
258
@@ -2839,8 +2836,8 @@ fn handle_event_loop<T: UserEvent>(
2839
2836
}
2840
2837
2841
2838
#[ cfg( feature = "tracing" ) ]
2842
- Event :: RedrawRequested ( id ) => {
2843
- active_tracing_spans. remove_window_draw ( id ) ;
2839
+ Event :: RedrawEventsCleared => {
2840
+ active_tracing_spans. remove_window_draw ( ) ;
2844
2841
}
2845
2842
2846
2843
#[ cfg( all( desktop, feature = "global-shortcut" ) ) ]
You can’t perform that action at this time.
0 commit comments