screencopy: fix isOutputBeingSSd (#13586)

use sessions instead of pending frames
This commit is contained in:
Vaxry 2026-03-05 15:14:13 +00:00 committed by GitHub
parent 4c60d9df70
commit 972f23efe8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -153,10 +153,10 @@ WP<CScreenshareSession> CScreenshareManager::getManagedSession(eScreenshareType
}
bool CScreenshareManager::isOutputBeingSSd(PHLMONITOR monitor) {
return std::ranges::any_of(m_pendingFrames, [monitor](const auto& f) {
if (!f || !f->m_session)
return std::ranges::any_of(m_sessions, [monitor](const auto& s) {
if (!s)
return false;
return (f->m_session->m_type == SHARE_MONITOR || f->m_session->m_type == SHARE_REGION) && f->m_session->m_monitor == monitor;
return (s->m_type == SHARE_MONITOR || s->m_type == SHARE_REGION) && s->m_monitor == monitor;
});
}

View file

@ -2499,6 +2499,7 @@ void CHyprOpenGLImpl::saveBufferForMirror(const CBox& box) {
renderTexture(m_renderData.currentFB->getTexture(), box,
STextureRenderData{
.damage = &m_renderData.finalDamage,
.a = 1.F,
.round = 0,
.discardActive = false,