mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-10 17:29:49 +01:00
renderer: fix CRendererHintsPassElement reset duplication issue (#8928)
This commit is contained in:
parent
dde3e082c9
commit
cbd2451570
1 changed files with 6 additions and 3 deletions
|
@ -807,13 +807,16 @@ void CHyprRenderer::renderAllClientsForWorkspace(PHLMONITOR pMonitor, PHLWORKSPA
|
||||||
if (scale != 1.f)
|
if (scale != 1.f)
|
||||||
RENDERMODIFDATA.modifs.emplace_back(std::make_pair<>(SRenderModifData::eRenderModifType::RMOD_TYPE_SCALE, scale));
|
RENDERMODIFDATA.modifs.emplace_back(std::make_pair<>(SRenderModifData::eRenderModifType::RMOD_TYPE_SCALE, scale));
|
||||||
|
|
||||||
CScopeGuard x([] {});
|
|
||||||
|
|
||||||
if (!RENDERMODIFDATA.modifs.empty()) {
|
if (!RENDERMODIFDATA.modifs.empty()) {
|
||||||
g_pHyprRenderer->m_sRenderPass.add(makeShared<CRendererHintsPassElement>(CRendererHintsPassElement::SData{RENDERMODIFDATA}));
|
g_pHyprRenderer->m_sRenderPass.add(makeShared<CRendererHintsPassElement>(CRendererHintsPassElement::SData{RENDERMODIFDATA}));
|
||||||
x = CScopeGuard([] { g_pHyprRenderer->m_sRenderPass.add(makeShared<CRendererHintsPassElement>(CRendererHintsPassElement::SData{SRenderModifData{}})); });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CScopeGuard x([&RENDERMODIFDATA] {
|
||||||
|
if (!RENDERMODIFDATA.modifs.empty()) {
|
||||||
|
g_pHyprRenderer->m_sRenderPass.add(makeShared<CRendererHintsPassElement>(CRendererHintsPassElement::SData{SRenderModifData{}}));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if (!pWorkspace) {
|
if (!pWorkspace) {
|
||||||
// allow rendering without a workspace. In this case, just render layers.
|
// allow rendering without a workspace. In this case, just render layers.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue