renderer: add option to blur IME popups (#8521)
This commit is contained in:
parent
00d6261cc0
commit
451d7a41fc
3 changed files with 24 additions and 1 deletions
|
|
@ -850,12 +850,21 @@ void CHyprRenderer::renderIMEPopup(CInputPopup* pPopup, PHLMONITOR pMonitor, tim
|
|||
|
||||
const auto SURF = pPopup->getSurface();
|
||||
|
||||
renderdata.blur = false;
|
||||
renderdata.surface = SURF;
|
||||
renderdata.decorate = false;
|
||||
renderdata.w = SURF->current.size.x;
|
||||
renderdata.h = SURF->current.size.y;
|
||||
|
||||
static auto PBLUR = CConfigValue<Hyprlang::INT>("decoration:blur:enabled");
|
||||
static auto PBLURIMES = CConfigValue<Hyprlang::INT>("decoration:blur:input_methods");
|
||||
static auto PBLURIGNOREA = CConfigValue<Hyprlang::FLOAT>("decoration:blur:input_methods_ignorealpha");
|
||||
|
||||
renderdata.blur = *PBLURIMES && *PBLUR;
|
||||
if (renderdata.blur) {
|
||||
g_pHyprOpenGL->m_RenderData.discardMode |= DISCARD_ALPHA;
|
||||
g_pHyprOpenGL->m_RenderData.discardOpacity = *PBLURIGNOREA;
|
||||
}
|
||||
|
||||
SURF->breadthfirst([](SP<CWLSurfaceResource> s, const Vector2D& offset, void* data) { renderSurface(s, offset.x, offset.y, data); }, &renderdata);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue