@@ -217,15 +217,14 @@ impl WindowState {
217217 & mut * ( state_ptr as * mut Self )
218218 }
219219
220- pub ( super ) fn trigger_event ( & mut self , event : Event ) {
221- self . window_handler . on_event (
222- & mut crate :: Window :: new ( & mut self . window ) ,
223- event
224- ) ;
220+ pub ( super ) fn trigger_event ( & mut self , event : Event ) {
221+ self . window_handler
222+ . on_event ( & mut crate :: Window :: new ( & mut self . window ) , event) ;
225223 }
226224
227- pub ( super ) fn trigger_frame ( & mut self ) {
228- self . window_handler . on_frame ( )
225+ pub ( super ) fn trigger_frame ( & mut self ) {
226+ self . window_handler
227+ . on_frame ( & mut crate :: Window :: new ( & mut self . window ) ) ;
229228 }
230229
231230 pub ( super ) fn process_native_key_event (
@@ -236,11 +235,11 @@ impl WindowState {
236235 }
237236
238237 /// Don't call until WindowState pointer is stored in view
239- unsafe fn setup_timer ( window_state_ptr : * mut WindowState ) {
238+ unsafe fn setup_timer ( window_state_ptr : * mut WindowState ) {
240239 extern "C" fn timer_callback (
241240 _: * mut __CFRunLoopTimer ,
242241 window_state_ptr : * mut c_void ,
243- ) {
242+ ) {
244243 unsafe {
245244 let window_state = & mut * (
246245 window_state_ptr as * mut WindowState
@@ -276,8 +275,8 @@ impl WindowState {
276275 }
277276
278277 /// Call when freeing view
279- pub ( super ) unsafe fn remove_timer ( & mut self ) {
280- if let Some ( frame_timer) = self . frame_timer . take ( ) {
278+ pub ( super ) unsafe fn remove_timer ( & mut self ) {
279+ if let Some ( frame_timer) = self . frame_timer . take ( ) {
281280 CFRunLoop :: get_current ( )
282281 . remove_timer ( & frame_timer, kCFRunLoopDefaultMode) ;
283282 }
0 commit comments