From 4734a4028ab804eca664fc583f2e1c206ce35651 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 16 Jul 2026 19:43:24 +1000 Subject: [PATCH] [idd] collapse duplicate messages to the latest event only --- idd/LGIdd/CPipeServer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/idd/LGIdd/CPipeServer.cpp b/idd/LGIdd/CPipeServer.cpp index 1e4ed06b..1b260212 100644 --- a/idd/LGIdd/CPipeServer.cpp +++ b/idd/LGIdd/CPipeServer.cpp @@ -222,6 +222,16 @@ void CPipeServer::WriteMsg(const LGPipeMsg & msg) { if (!m_connected) { + // Not connected yet: keep only the latest message of each type. These are + // all latest-state-wins messages, so a burst (e.g. display mode changes + // while resizing) must collapse to the final state rather than replay every + // intermediate value when the helper reconnects. + for (auto & queued : m_queue) + if (queued.type == msg.type) + { + queued = msg; + return; + } m_queue.push_back(msg); return; }