summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-07-21 23:25:20 +0200
committerVaxry <vaxry@vaxry.net>2024-07-21 23:52:16 +0200
commit672bf1f8670b200da57e2f6de4e9ed7efd8c98fc (patch)
treea71b71c6ab48031e0217ebfacd85e7159a4e9d1a /src/Compositor.cpp
parent33e933e2a020c874037df568d6c033ae20f30bf7 (diff)
compositor: ignore setting surface scanout if DS is disabled
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index c7a0cfb1..02ca5363 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -2285,6 +2285,8 @@ void CCompositor::updateFullscreenFadeOnWorkspace(PHLWORKSPACE pWorkspace) {
}
void CCompositor::setWindowFullscreen(PHLWINDOW pWindow, bool on, eFullscreenMode mode) {
+ static auto PNODIRECTSCANOUT = CConfigValue<Hyprlang::INT>("misc:no_direct_scanout");
+
if (!validMapped(pWindow) || g_pCompositor->m_bUnsafeState)
return;
@@ -2333,7 +2335,9 @@ void CCompositor::setWindowFullscreen(PHLWINDOW pWindow, bool on, eFullscreenMod
return;
// send a scanout tranche if we are entering fullscreen, and send a regular one if we aren't.
- g_pHyprRenderer->setSurfaceScanoutMode(pWindow->m_pWLSurface->resource(), on ? PMONITOR->self.lock() : nullptr);
+ // ignore if DS is disabled.
+ if (!*PNODIRECTSCANOUT)
+ g_pHyprRenderer->setSurfaceScanoutMode(pWindow->m_pWLSurface->resource(), on ? PMONITOR->self.lock() : nullptr);
g_pConfigManager->ensureVRR(PMONITOR);
}