mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 03:45:59 +01:00
compositor: ignore setting surface scanout if DS is disabled
This commit is contained in:
parent
33e933e2a0
commit
672bf1f867
2 changed files with 6 additions and 2 deletions
|
@ -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,6 +2335,8 @@ 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.
|
||||
// ignore if DS is disabled.
|
||||
if (!*PNODIRECTSCANOUT)
|
||||
g_pHyprRenderer->setSurfaceScanoutMode(pWindow->m_pWLSurface->resource(), on ? PMONITOR->self.lock() : nullptr);
|
||||
|
||||
g_pConfigManager->ensureVRR(PMONITOR);
|
||||
|
|
Loading…
Reference in a new issue