@@ -186,7 +186,7 @@ impl Window {
186186 new_physical_size : None ,
187187 } ;
188188
189- let mut handler = build ( & mut crate :: Window ( & mut window) ) ;
189+ let mut handler = build ( & mut crate :: Window :: new ( & mut window) ) ;
190190
191191 let _ = tx. send ( Ok ( ( ) ) ) ;
192192
@@ -238,7 +238,7 @@ impl Window {
238238 let window_info = self . window_info ;
239239
240240 handler. on_event (
241- & mut crate :: Window ( self ) ,
241+ & mut crate :: Window :: new ( self ) ,
242242 Event :: Window ( WindowEvent :: Resized ( window_info) )
243243 )
244244 }
@@ -326,7 +326,7 @@ impl Window {
326326
327327 if wm_delete_window == data32[ 0 ] {
328328 handler. on_event (
329- & mut crate :: Window ( self ) ,
329+ & mut crate :: Window :: new ( self ) ,
330330 Event :: Window ( WindowEvent :: WillClose )
331331 ) ;
332332
@@ -357,7 +357,7 @@ impl Window {
357357 let logical_pos = physical_pos. to_logical ( & self . window_info ) ;
358358
359359 handler. on_event (
360- & mut crate :: Window ( self ) ,
360+ & mut crate :: Window :: new ( self ) ,
361361 Event :: Mouse ( MouseEvent :: CursorMoved {
362362 position : logical_pos,
363363 } ) ,
@@ -372,7 +372,7 @@ impl Window {
372372 match detail {
373373 4 => {
374374 handler. on_event (
375- & mut crate :: Window ( self ) ,
375+ & mut crate :: Window :: new ( self ) ,
376376 Event :: Mouse ( MouseEvent :: WheelScrolled ( ScrollDelta :: Lines {
377377 x : 0.0 ,
378378 y : 1.0 ,
@@ -381,7 +381,7 @@ impl Window {
381381 }
382382 5 => {
383383 handler. on_event (
384- & mut crate :: Window ( self ) ,
384+ & mut crate :: Window :: new ( self ) ,
385385 Event :: Mouse ( MouseEvent :: WheelScrolled ( ScrollDelta :: Lines {
386386 x : 0.0 ,
387387 y : -1.0 ,
@@ -391,7 +391,7 @@ impl Window {
391391 detail => {
392392 let button_id = mouse_id ( detail) ;
393393 handler. on_event (
394- & mut crate :: Window ( self ) ,
394+ & mut crate :: Window :: new ( self ) ,
395395 Event :: Mouse ( MouseEvent :: ButtonPressed ( button_id) )
396396 ) ;
397397 }
@@ -405,7 +405,7 @@ impl Window {
405405 if detail != 4 && detail != 5 {
406406 let button_id = mouse_id ( detail) ;
407407 handler. on_event (
408- & mut crate :: Window ( self ) ,
408+ & mut crate :: Window :: new ( self ) ,
409409 Event :: Mouse ( MouseEvent :: ButtonReleased ( button_id) )
410410 ) ;
411411 }
@@ -418,7 +418,7 @@ impl Window {
418418 let event = unsafe { xcb:: cast_event :: < xcb:: KeyPressEvent > ( & event) } ;
419419
420420 handler. on_event (
421- & mut crate :: Window ( self ) ,
421+ & mut crate :: Window :: new ( self ) ,
422422 Event :: Keyboard ( convert_key_press_event ( & event) )
423423 ) ;
424424 }
@@ -427,7 +427,7 @@ impl Window {
427427 let event = unsafe { xcb:: cast_event :: < xcb:: KeyReleaseEvent > ( & event) } ;
428428
429429 handler. on_event (
430- & mut crate :: Window ( self ) ,
430+ & mut crate :: Window :: new ( self ) ,
431431 Event :: Keyboard ( convert_key_release_event ( & event) )
432432 ) ;
433433 }
0 commit comments