Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/backend/tty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,14 @@ impl Tty {
}
.map_err(|()| anyhow!("error assigning the seat to libinput"))?;

// If the session is not active at startup (e.g. Niri was launched from a different TTY),
// suspend libinput now so that when ActivateSession fires, libinput.resume() performs a
// full re-enumeration of input devices instead of being a no-op.
if !session.is_active() {
debug!("session is not active, starting in paused state");
libinput.suspend();
}

let input_backend = LibinputInputBackend::new(libinput.clone());
event_loop
.insert_source(input_backend, |mut event, _, state| {
Expand Down