Start config after xwayland starts

This commit is contained in:
Ottatop 2024-03-30 17:50:53 -05:00
parent 145ab55dc9
commit 7e1189017b
2 changed files with 4 additions and 7 deletions

View file

@ -555,7 +555,6 @@ impl process_service_server::ProcessService for ProcessService {
}
let Ok(mut child) = tokio::process::Command::new(OsString::from(arg0.clone()))
.envs(state.xdisplay.map(|xdisp| ("DISPLAY", format!(":{xdisp}"))))
.stdin(match has_callback {
true => Stdio::piped(),
false => Stdio::null(),

View file

@ -161,12 +161,6 @@ impl State {
},
)?;
loop_handle.insert_idle(|state| {
if let Err(err) = state.start_config(state.config.dir(&state.xdg_base_dirs)) {
panic!("failed to start config: {err}");
}
});
let mut seat_state = SeatState::new();
let mut seat = seat_state.new_wl_seat(&display_handle, backend.seat_name());
@ -208,6 +202,10 @@ impl State {
state.xdisplay = Some(display);
std::env::set_var("DISPLAY", format!(":{display}"));
if let Err(err) = state.start_config(state.config.dir(&state.xdg_base_dirs)) {
panic!("failed to start config: {err}");
}
}
XWaylandEvent::Exited => {
state.xwm.take();