renderer: add render:send_content_type setting (#9851)
This commit is contained in:
parent
49974d5e34
commit
ae1fe860ff
3 changed files with 15 additions and 5 deletions
|
|
@ -1477,6 +1477,7 @@ static hdr_output_metadata createHDRMetadata(SImageDescription settings, A
|
|||
}
|
||||
|
||||
bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
|
||||
static auto PCT = CConfigValue<Hyprlang::INT>("render:send_content_type");
|
||||
static auto PPASS = CConfigValue<Hyprlang::INT>("render:cm_fs_passthrough");
|
||||
const bool PHDR = pMonitor->imageDescription.transferFunction == CM_TRANSFER_FUNCTION_ST2084_PQ;
|
||||
|
||||
|
|
@ -1540,11 +1541,13 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) {
|
|||
}
|
||||
}
|
||||
|
||||
if (pMonitor->activeWorkspace && pMonitor->activeWorkspace->m_hasFullscreenWindow && pMonitor->activeWorkspace->m_fullscreenMode == FSMODE_FULLSCREEN) {
|
||||
const auto WINDOW = pMonitor->activeWorkspace->getFullscreenWindow();
|
||||
pMonitor->output->state->setContentType(NContentType::toDRM(WINDOW->getContentType()));
|
||||
} else
|
||||
pMonitor->output->state->setContentType(NContentType::toDRM(CONTENT_TYPE_NONE));
|
||||
if (*PCT) {
|
||||
if (pMonitor->activeWorkspace && pMonitor->activeWorkspace->m_hasFullscreenWindow && pMonitor->activeWorkspace->m_fullscreenMode == FSMODE_FULLSCREEN) {
|
||||
const auto WINDOW = pMonitor->activeWorkspace->getFullscreenWindow();
|
||||
pMonitor->output->state->setContentType(NContentType::toDRM(WINDOW->getContentType()));
|
||||
} else
|
||||
pMonitor->output->state->setContentType(NContentType::toDRM(CONTENT_TYPE_NONE));
|
||||
}
|
||||
|
||||
if (pMonitor->ctmUpdated) {
|
||||
pMonitor->ctmUpdated = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue