From 06b37c390715e05f852076a8d1160e27c5cd291c Mon Sep 17 00:00:00 2001 From: nikromen <70757578+nikromen@users.noreply.github.com> Date: Sun, 9 Nov 2025 00:45:53 +0100 Subject: protocols/outputMgmt: fix wlr-randr by defering success event until monitor reloads (#12236) wlr-randr disconnects immediately after receiving success event, but before applying the monitor configuration. This causes the state to be lost when performMonitorReload() is called. By postponing the success event until the call of the hook monitorLayoutChanged we ensure the configuration to remain valid during the reload process. --- src/protocols/OutputManagement.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/protocols/OutputManagement.hpp') diff --git a/src/protocols/OutputManagement.hpp b/src/protocols/OutputManagement.hpp index cb03661e..f26e9c91 100644 --- a/src/protocols/OutputManagement.hpp +++ b/src/protocols/OutputManagement.hpp @@ -141,8 +141,12 @@ class COutputConfiguration { SP m_resource; std::vector> m_heads; WP m_owner; + WP m_self; bool applyTestConfiguration(bool test); + + friend class COutputManagementProtocol; + friend class COutputManager; }; class COutputManagementProtocol : public IWaylandProtocol { @@ -154,6 +158,8 @@ class COutputManagementProtocol : public IWaylandProtocol { // doesn't have to return one SP getOutputStateFor(PHLMONITOR pMonitor); + void sendPendingSuccessEvents(); + private: void destroyResource(COutputManager* resource); void destroyResource(COutputHead* resource); @@ -169,6 +175,7 @@ class COutputManagementProtocol : public IWaylandProtocol { std::vector> m_modes; std::vector> m_configurations; std::vector> m_configurationHeads; + std::vector> m_pendingConfigurationSuccessEvents; SP headFromResource(wl_resource* r); SP modeFromResource(wl_resource* r); -- cgit v1.2.3