From 97bc5009e5e11b264401dc28645cbed2acab702d Mon Sep 17 00:00:00 2001 From: Ilia Bozhinov Date: Fri, 3 Nov 2023 16:56:37 +0100 Subject: [PATCH] workspace-impl: return output size directly if output is attached (#1997) Fixes #1991 The idea is that otherwise we can have race conditions depending on the order of the output-configuration-changed handlers. --- src/output/workspace-impl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/output/workspace-impl.cpp b/src/output/workspace-impl.cpp index 992c8cda1..1cad36e8e 100644 --- a/src/output/workspace-impl.cpp +++ b/src/output/workspace-impl.cpp @@ -757,6 +757,11 @@ uint64_t workspace_set_t::get_index() const std::optional workspace_set_t::get_last_output_geometry() { + if (pimpl->output) + { + return pimpl->output->get_relative_geometry(); + } + return pimpl->workspace_geometry; }