xwayland: persist additional properties
This commit is contained in:
parent
da01d7e0d3
commit
4278160113
3 changed files with 12 additions and 2 deletions
|
|
@ -114,9 +114,13 @@ pub async fn manage(state: Rc<State>) {
|
|||
log::error!("Could not listen on the Xwayland socket: {}", ErrorFmt(e));
|
||||
return;
|
||||
}
|
||||
let display = format!(":{}", xsocket.id);
|
||||
let display = Rc::new(format!(":{}", xsocket.id));
|
||||
forker.setenv(DISPLAY.as_bytes(), display.as_bytes());
|
||||
let _unsetenv = on_drop(|| forker.unsetenv(DISPLAY.as_bytes()));
|
||||
state.xwayland.display.set(Some(display.clone()));
|
||||
let _unsetenv = on_drop(|| {
|
||||
forker.unsetenv(DISPLAY.as_bytes());
|
||||
state.xwayland.display.take();
|
||||
});
|
||||
log::info!("Allocated display :{} for Xwayland", xsocket.id);
|
||||
log::info!("Waiting for connection attempt");
|
||||
if state.backend.get().import_environment() {
|
||||
|
|
@ -207,8 +211,10 @@ async fn run(
|
|||
state.ring.readable(&Rc::new(dfdread)).await?;
|
||||
state.xwayland.queue.clear();
|
||||
state.xwayland.pidfd.set(Some(pidfd.clone()));
|
||||
state.xwayland.client.set(Some(client.clone()));
|
||||
let _remove_pidfd = on_drop(|| {
|
||||
state.xwayland.pidfd.take();
|
||||
state.xwayland.client.take();
|
||||
});
|
||||
{
|
||||
let shared = Rc::new(XwmShared::default());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue