summaryrefslogtreecommitdiff
path: root/src/protocols/ToplevelExport.cpp
diff options
context:
space:
mode:
authorKamikadze <40305144+Kam1k4dze@users.noreply.github.com>2025-05-27 20:10:22 +0500
committerGitHub <noreply@github.com>2025-05-27 16:10:22 +0100
commit24915a3a9b0bb8c4dc8b5a365cc0bc3a03ee36f0 (patch)
tree243e23671c81e48364ad76272f2e6b6d4793c363 /src/protocols/ToplevelExport.cpp
parent90d0b8ecae9540c21ce418ef781cf0fc2afc4dff (diff)
windowrules: Add noscreenshare (#10482)
Diffstat (limited to 'src/protocols/ToplevelExport.cpp')
-rw-r--r--src/protocols/ToplevelExport.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/protocols/ToplevelExport.cpp b/src/protocols/ToplevelExport.cpp
index e50f1fce..4d0ee0f8 100644
--- a/src/protocols/ToplevelExport.cpp
+++ b/src/protocols/ToplevelExport.cpp
@@ -257,10 +257,11 @@ bool CToplevelExportFrame::copyShm(const Time::steady_tp& now) {
// render client at 0,0
if (PERM == PERMISSION_RULE_ALLOW_MODE_ALLOW) {
- g_pHyprRenderer->m_bBlockSurfaceFeedback = g_pHyprRenderer->shouldRenderWindow(m_window); // block the feedback to avoid spamming the surface if it's visible
- g_pHyprRenderer->renderWindow(m_window, PMONITOR, now, false, RENDER_PASS_ALL, true, true);
- g_pHyprRenderer->m_bBlockSurfaceFeedback = false;
-
+ if (!m_window->m_windowData.noScreenShare.valueOrDefault()) {
+ g_pHyprRenderer->m_bBlockSurfaceFeedback = g_pHyprRenderer->shouldRenderWindow(m_window); // block the feedback to avoid spamming the surface if it's visible
+ g_pHyprRenderer->renderWindow(m_window, PMONITOR, now, false, RENDER_PASS_ALL, true, true);
+ g_pHyprRenderer->m_bBlockSurfaceFeedback = false;
+ }
if (overlayCursor)
g_pPointerManager->renderSoftwareCursorsFor(PMONITOR->m_self.lock(), now, fakeDamage, g_pInputManager->getMouseCoordsInternal() - m_window->m_realPosition->value());
} else if (PERM == PERMISSION_RULE_ALLOW_MODE_DENY) {
@@ -338,9 +339,11 @@ bool CToplevelExportFrame::copyDmabuf(const Time::steady_tp& now) {
g_pHyprOpenGL->clear(CHyprColor(0, 0, 0, 1.0));
if (PERM == PERMISSION_RULE_ALLOW_MODE_ALLOW) {
- g_pHyprRenderer->m_bBlockSurfaceFeedback = g_pHyprRenderer->shouldRenderWindow(m_window); // block the feedback to avoid spamming the surface if it's visible
- g_pHyprRenderer->renderWindow(m_window, PMONITOR, now, false, RENDER_PASS_ALL, true, true);
- g_pHyprRenderer->m_bBlockSurfaceFeedback = false;
+ if (!m_window->m_windowData.noScreenShare.valueOrDefault()) {
+ g_pHyprRenderer->m_bBlockSurfaceFeedback = g_pHyprRenderer->shouldRenderWindow(m_window); // block the feedback to avoid spamming the surface if it's visible
+ g_pHyprRenderer->renderWindow(m_window, PMONITOR, now, false, RENDER_PASS_ALL, true, true);
+ g_pHyprRenderer->m_bBlockSurfaceFeedback = false;
+ }
if (overlayCursor)
g_pPointerManager->renderSoftwareCursorsFor(PMONITOR->m_self.lock(), now, fakeDamage, g_pInputManager->getMouseCoordsInternal() - m_window->m_realPosition->value());