core: add an ANR dialog

for xdg-shell, we can ping the wm_base, and thus render an ANR dialog if an app dies

for XWayland, there probably is a similar method, but I don't know about it and don't care.
This commit is contained in:
Vaxry 2025-02-18 15:10:40 +00:00
parent 3352317ca8
commit fb8eaba83f
11 changed files with 272 additions and 6 deletions

View file

@ -1396,12 +1396,18 @@ void CHyprOpenGLImpl::renderTextureInternalWithDamage(SP<CTexture> tex, const CB
glUniform1f(shader->roundingPower, roundingPower);
if (allowDim && m_RenderData.currentWindow) {
glUniform1i(shader->applyTint, 1);
const auto DIM = m_RenderData.currentWindow->m_fDimPercent->value();
glUniform3f(shader->tint, 1.f - DIM, 1.f - DIM, 1.f - DIM);
} else {
if (m_RenderData.currentWindow->m_notRespondingTint->value() > 0) {
const auto DIM = m_RenderData.currentWindow->m_notRespondingTint->value();
glUniform1i(shader->applyTint, 1);
glUniform3f(shader->tint, 1.f - DIM, 1.f - DIM, 1.f - DIM);
} else if (m_RenderData.currentWindow->m_fDimPercent->value() > 0) {
glUniform1i(shader->applyTint, 1);
const auto DIM = m_RenderData.currentWindow->m_fDimPercent->value();
glUniform3f(shader->tint, 1.f - DIM, 1.f - DIM, 1.f - DIM);
} else
glUniform1i(shader->applyTint, 0);
} else
glUniform1i(shader->applyTint, 0);
}
}
const float verts[] = {