windowrules: Add novrr dynamic window rule (#11370)

This commit is contained in:
Hleb Shauchenka 2025-08-22 11:48:42 +02:00 committed by GitHub
parent 42caff5587
commit fdf1612f0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 18 additions and 1 deletions

View file

@ -1848,6 +1848,9 @@ void CConfigManager::ensureVRR(PHLMONITOR pMonitor) {
return; // ???
bool wantVRR = PWORKSPACE->m_hasFullscreenWindow && (PWORKSPACE->m_fullscreenMode & FSMODE_FULLSCREEN);
if (wantVRR && PWORKSPACE->getFullscreenWindow()->m_windowData.noVRR.valueOrDefault())
wantVRR = false;
if (wantVRR && USEVRR == 3) {
const auto contentType = PWORKSPACE->getFullscreenWindow()->getContentType();
wantVRR = contentType == CONTENT_TYPE_GAME || contentType == CONTENT_TYPE_VIDEO;