presentation: only send sync output on presented (#12255)

as protocol states there is two events. 'presented' or 'discarded'.

wp_presentation_feedback::sync_output
As presentation can be synchronized to only one output at a time, this event tells which output it was.
This event is only sent prior to the presented event.
This commit is contained in:
Tom Englund 2025-11-11 21:00:59 +01:00 committed by GitHub
parent ac8edc6a80
commit cadf922417
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,7 +43,7 @@ bool CPresentationFeedback::good() {
void CPresentationFeedback::sendQueued(WP<CQueuedPresentationData> data, const Time::steady_tp& when, uint32_t untilRefreshNs, uint64_t seq, uint32_t reportedFlags) {
auto client = m_resource->client();
if LIKELY (PROTO::outputs.contains(data->m_monitor->m_name)) {
if LIKELY (PROTO::outputs.contains(data->m_monitor->m_name) && data->m_wasPresented) {
if LIKELY (auto outputResource = PROTO::outputs.at(data->m_monitor->m_name)->outputResourceFrom(client); outputResource)
m_resource->sendSyncOutput(outputResource->getResource()->resource());
}