xwayland: Fix display env variable race
This commit is contained in:
parent
7704f65d02
commit
4940d0823d
6 changed files with 16 additions and 10 deletions
|
|
@ -77,7 +77,13 @@ pub fn setup_socket(handle: LoopHandle<Data>, state: &State) -> Result<()> {
|
|||
.into_string()
|
||||
.map_err(|_| anyhow!("wayland socket is no valid utf-8 string?"))?,
|
||||
);
|
||||
if let Some(display) = state.common.xwayland_state.values().find_map(|s| s.display) {
|
||||
if let Some(display) = state
|
||||
.common
|
||||
.xwayland_state
|
||||
.values()
|
||||
.next()
|
||||
.map(|s| s.display)
|
||||
{
|
||||
env.insert(String::from("DISPLAY"), format!(":{}", display));
|
||||
}
|
||||
let message = serde_json::to_string(&Message::SetEnv { variables: env })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue