summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-06 14:11:37 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-06 14:11:37 +0000
commit12697d2b722ec0976ac6b2fc650f26ea61d36627 (patch)
tree8997f46c808fd21258f3536a91721ce826e026f3
parent976b44443ae1603699a5fc4ef1eb3c6e0f5886c8 (diff)
added toggle for drm scanout flags
-rw-r--r--src/config/ConfigManager.cpp1
-rw-r--r--src/render/Renderer.cpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index e64fc86b..564c3ba7 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -59,6 +59,7 @@ void CConfigManager::setDefaultVars() {
configValues["misc:swallow_regex"].strValue = STRVAL_EMPTY;
configValues["misc:focus_on_activate"].intValue = 0;
configValues["misc:no_direct_scanout"].intValue = 0;
+ configValues["misc:enable_drm_scanout_flags"].intValue = 0;
configValues["debug:int"].intValue = 0;
configValues["debug:log_damage"].intValue = 0;
diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp
index 2e7c5433..1c8fb78d 100644
--- a/src/render/Renderer.cpp
+++ b/src/render/Renderer.cpp
@@ -613,6 +613,11 @@ void CHyprRenderer::setWindowScanoutMode(CWindow* pWindow) {
if (!g_pCompositor->m_sWLRLinuxDMABuf)
return;
+ static auto *const PENABLED = &g_pConfigManager->getConfigValuePtr("misc:enable_drm_scanout_flags")->intValue;
+
+ if (!*PENABLED)
+ return;
+
if (!pWindow->m_bIsFullscreen) {
wlr_linux_dmabuf_v1_set_surface_feedback(g_pCompositor->m_sWLRLinuxDMABuf, g_pXWaylandManager->getWindowSurface(pWindow), nullptr);
Debug::log(LOG, "Scanout mode OFF set for %x", pWindow);