@@ -3,7 +3,6 @@ use super::keyboard::{convert_key_press_event, convert_key_release_event, key_mo
33use super :: * ;
44use std:: result:: Result ;
55
6- use crate :: platform:: x11:: window_thread:: WindowThreadShared ;
76use crate :: warn;
87use crate :: wrappers:: xkbcommon:: XkbcommonState ;
98use crate :: { Event , MouseButton , MouseEvent , ScrollDelta , WindowEvent , WindowHandler , WindowSize } ;
@@ -29,14 +28,13 @@ pub(crate) struct EventLoop {
2928 xkb_state : Option < XkbcommonState > ,
3029
3130 run_error : Option < Error > ,
32- pub ( crate ) shared : Arc < WindowThreadShared > ,
3331}
3432
3533const FRAME_INTERVAL : Duration = Duration :: from_millis ( 15 ) ;
3634
3735impl EventLoop {
3836 pub fn new (
39- window : Rc < WindowInner > , handler : Box < dyn WindowHandler > , shared : Arc < WindowThreadShared > ,
37+ window : Rc < WindowInner > , handler : Box < dyn WindowHandler > ,
4038 inner : & mut calloop:: EventLoop < ' static , Self > ,
4139 ) -> Result < Self , Error > {
4240 let loop_handle = inner. handle ( ) ;
@@ -59,15 +57,10 @@ impl EventLoop {
5957 drag_n_drop : DragNDropState :: NoCurrentSession ,
6058 xkb_state : XkbcommonState :: new ( & window. connection ) ,
6159 run_error : None ,
62- shared,
6360 window,
6461 } )
6562 }
6663
67- pub fn window_id ( & self ) -> NonZeroU32 {
68- self . window . xcb_window . id ( )
69- }
70-
7164 #[ inline]
7265 fn drain_xcb_events ( & mut self ) -> Result < ( ) , ConnectionError > {
7366 // the X server has a tendency to send spurious/extraneous configure notify events when a
0 commit comments