diff --git a/crates/wrclient/src/main.rs b/crates/wrclient/src/main.rs index a33fb7d..60d52ef 100644 --- a/crates/wrclient/src/main.rs +++ b/crates/wrclient/src/main.rs @@ -125,8 +125,10 @@ impl ApplicationHandler for App { ) { match event { WindowEvent::CloseRequested => { - info!("close requested, exiting"); + info!("close requested, shutting down"); event_loop.exit(); + // Force exit since the network thread may be blocking. + std::process::exit(0); } WindowEvent::Resized(physical_size) => { if let Some(display) = &mut self.display { diff --git a/crates/wrsrvd/src/backend/headless.rs b/crates/wrsrvd/src/backend/headless.rs index e0fca40..ba2cee5 100644 --- a/crates/wrsrvd/src/backend/headless.rs +++ b/crates/wrsrvd/src/backend/headless.rs @@ -181,8 +181,9 @@ pub fn run( } info!("headless backend shutting down"); - calloop_data.net_handle.shutdown(); - Ok(()) + // Force exit — the network thread may be blocking on accept(). + // Proper graceful shutdown with tokio CancellationToken is a future improvement. + std::process::exit(0); } /// Drain all pending network events (input, connection changes). diff --git a/crates/wrsrvd/src/state.rs b/crates/wrsrvd/src/state.rs index fbb9052..b88c3d8 100644 --- a/crates/wrsrvd/src/state.rs +++ b/crates/wrsrvd/src/state.rs @@ -210,9 +210,10 @@ impl WayRay { smithay::backend::input::KeyState::Released } }; + // XKB keycodes = evdev scancode + 8 keyboard.input::<(), _>( self, - ev.keycode.into(), + (ev.keycode + 8).into(), state, serial, ev.time,