File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -504,6 +504,9 @@ void CScreencopyProtocol::destroyResource(CScreencopyClient* client) {
504504 std::erase_if (m_clients, [&](const auto & other) { return other.get () == client; });
505505 std::erase_if (m_frames, [&](const auto & other) { return other->m_client .get () == client; });
506506 std::erase_if (m_framesAwaitingWrite, [&](const auto & other) { return !other || other->m_client .get () == client; });
507+
508+ if (m_clients.empty ())
509+ g_pHyprRenderer->m_directScanoutBlocked = false ;
507510}
508511
509512void CScreencopyProtocol::destroyResource (CScreencopyFrame* frame) {
@@ -513,6 +516,10 @@ void CScreencopyProtocol::destroyResource(CScreencopyFrame* frame) {
513516
514517void CScreencopyProtocol::onOutputCommit (PHLMONITOR pMonitor) {
515518 if (m_framesAwaitingWrite.empty ()) {
519+ for (auto client : m_clients) {
520+ if (client->m_framesInLastHalfSecond > 0 )
521+ return ;
522+ }
516523 g_pHyprRenderer->m_directScanoutBlocked = false ;
517524 return ; // nothing to share
518525 }
You can’t perform that action at this time.
0 commit comments