diff --git a/frontends/rioterm/src/context/mod.rs b/frontends/rioterm/src/context/mod.rs index 083f4c5c24..fc72bcceb0 100644 --- a/frontends/rioterm/src/context/mod.rs +++ b/frontends/rioterm/src/context/mod.rs @@ -706,6 +706,7 @@ impl ContextManager { self.titles.set_key_val(i, content, None); } } + //println!("MITIGATION"); self.titles.set_key(id); } diff --git a/rio-window/src/application.rs b/rio-window/src/application.rs index da7fe8efdd..4a686f1916 100644 --- a/rio-window/src/application.rs +++ b/rio-window/src/application.rs @@ -86,9 +86,7 @@ pub trait ApplicationHandler { /// Emitted when an event is sent from [`EventLoopProxy::send_event`]. /// /// [`EventLoopProxy::send_event`]: crate::event_loop::EventLoopProxy::send_event - fn user_event(&mut self, event_loop: &ActiveEventLoop, event: T) { - let _ = (event_loop, event); - } + fn user_event(&mut self, event_loop: &ActiveEventLoop, event: T); /// Emitted when the OS sends an event to a winit window. fn window_event( diff --git a/rio-window/src/platform_impl/linux/wayland/event_loop/mod.rs b/rio-window/src/platform_impl/linux/wayland/event_loop/mod.rs index 710766d24b..680f32495d 100644 --- a/rio-window/src/platform_impl/linux/wayland/event_loop/mod.rs +++ b/rio-window/src/platform_impl/linux/wayland/event_loop/mod.rs @@ -61,7 +61,7 @@ pub struct EventLoop { /// The Wayland dispatcher to has raw access to the queue when needed, such as /// when creating a new window. - wayland_dispatcher: WaylandDispatcher, + wayland_dispatcher: Rc, /// Connection to the wayland server. connection: Connection, @@ -123,6 +123,7 @@ impl EventLoop { }, ); + // register_dispatcher requires ownership of the dispatcher. map_err!( event_loop .handle() @@ -130,6 +131,8 @@ impl EventLoop { WaylandError::Calloop )?; + let dispatch_clone = Rc::new(wayland_dispatcher); + // Setup the user proxy. let pending_user_events = Rc::new(RefCell::new(Vec::new())); let pending_user_events_clone = pending_user_events.clone(); @@ -169,7 +172,7 @@ impl EventLoop { let window_target = ActiveEventLoop { connection: connection.clone(), - wayland_dispatcher: wayland_dispatcher.clone(), + wayland_dispatcher: Rc::clone(&dispatch_clone), event_loop_awakener, queue_handle, control_flow: Cell::new(ControlFlow::default()), @@ -183,7 +186,7 @@ impl EventLoop { buffer_sink: EventSink::default(), window_ids: Vec::new(), connection, - wayland_dispatcher, + wayland_dispatcher: Rc::clone(&dispatch_clone), user_events_sender, pending_user_events, event_loop, @@ -685,7 +688,7 @@ pub struct ActiveEventLoop { pub state: RefCell, /// Dispatcher of Wayland events. - pub wayland_dispatcher: WaylandDispatcher, + pub wayland_dispatcher: Rc, /// Connection to the wayland server. pub connection: Connection,