state: Move Xwayland state into shell

This commit is contained in:
Victoria Brekenfeld 2023-11-22 12:44:11 +01:00 committed by Victoria Brekenfeld
parent 41a69cfc9f
commit c09a735289
8 changed files with 21 additions and 13 deletions

View file

@ -82,7 +82,13 @@ pub fn setup_socket(handle: LoopHandle<State>, state: &State) -> Result<()> {
.into_string()
.map_err(|_| anyhow!("wayland socket is no valid utf-8 string?"))?,
);
if let Some(display) = state.common.xwayland_state.as_ref().map(|s| s.display) {
if let Some(display) = state
.common
.shell
.xwayland_state
.as_ref()
.map(|s| s.display)
{
env.insert(String::from("DISPLAY"), format!(":{}", display));
}
let message = serde_json::to_string(&Message::SetEnv { variables: env })