From 0d0b89d53889cc1049eafc7747930b111a05b3a0 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Tue, 10 Dec 2024 14:56:57 -0800 Subject: [PATCH] Call `data_init.init` even if weak references are not alive --- .../protocols/output_configuration/handlers/cosmic.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wayland/protocols/output_configuration/handlers/cosmic.rs b/src/wayland/protocols/output_configuration/handlers/cosmic.rs index b3d23606..b0b768df 100644 --- a/src/wayland/protocols/output_configuration/handlers/cosmic.rs +++ b/src/wayland/protocols/output_configuration/handlers/cosmic.rs @@ -213,7 +213,13 @@ where output_conf.lock().unwrap().mirroring = Some(output.clone()); let conf_head = data_init.init(id, output_conf); pending.heads.push((head, Some(conf_head))); + } else { + let output_conf = PendingOutputConfiguration::default(); + data_init.init(id, output_conf); } + } else { + let output_conf = PendingOutputConfiguration::default(); + data_init.init(id, output_conf); } } zcosmic_output_configuration_v1::Request::Release => {