mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 22:22:00 -07:00
Decos: Window decoration flags, shadow improvements (#3739)
This commit is contained in:
@@ -425,9 +425,21 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
|
||||
}
|
||||
}
|
||||
|
||||
if (!pWindow->m_bIsFullscreen || PWORKSPACE->m_efFullscreenMode != FULLSCREEN_FULL)
|
||||
for (auto& wd : pWindow->m_dWindowDecorations)
|
||||
if (!pWindow->m_bIsFullscreen || PWORKSPACE->m_efFullscreenMode != FULLSCREEN_FULL) {
|
||||
for (auto& wd : pWindow->m_dWindowDecorations) {
|
||||
if (wd->getDecorationLayer() != DECORATION_LAYER_BOTTOM)
|
||||
continue;
|
||||
|
||||
wd->draw(pMonitor, renderdata.alpha * renderdata.fadeAlpha, Vector2D{renderdata.x, renderdata.y} - PREOFFSETPOS);
|
||||
}
|
||||
|
||||
for (auto& wd : pWindow->m_dWindowDecorations) {
|
||||
if (wd->getDecorationLayer() != DECORATION_LAYER_UNDER)
|
||||
continue;
|
||||
|
||||
wd->draw(pMonitor, renderdata.alpha * renderdata.fadeAlpha, Vector2D{renderdata.x, renderdata.y} - PREOFFSETPOS);
|
||||
}
|
||||
}
|
||||
|
||||
static auto* const PXWLUSENN = &g_pConfigManager->getConfigValuePtr("xwayland:use_nearest_neighbor")->intValue;
|
||||
if ((pWindow->m_bIsX11 && *PXWLUSENN) || pWindow->m_sAdditionalConfigData.nearestNeighbor.toUnderlying())
|
||||
@@ -470,6 +482,13 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
|
||||
}
|
||||
}
|
||||
|
||||
for (auto& wd : pWindow->m_dWindowDecorations) {
|
||||
if (wd->getDecorationLayer() != DECORATION_LAYER_OVER)
|
||||
continue;
|
||||
|
||||
wd->draw(pMonitor, renderdata.alpha * renderdata.fadeAlpha, Vector2D{renderdata.x, renderdata.y} - PREOFFSETPOS);
|
||||
}
|
||||
|
||||
if (TRANSFORMERSPRESENT) {
|
||||
|
||||
CFramebuffer* last = g_pHyprOpenGL->m_RenderData.currentFB;
|
||||
@@ -501,6 +520,13 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
|
||||
|
||||
g_pHyprOpenGL->m_RenderData.useNearestNeighbor = false;
|
||||
}
|
||||
|
||||
for (auto& wd : pWindow->m_dWindowDecorations) {
|
||||
if (wd->getDecorationLayer() != DECORATION_LAYER_OVERLAY)
|
||||
continue;
|
||||
|
||||
wd->draw(pMonitor, renderdata.alpha * renderdata.fadeAlpha, Vector2D{renderdata.x, renderdata.y} - PREOFFSETPOS);
|
||||
}
|
||||
}
|
||||
|
||||
EMIT_HOOK_EVENT("render", RENDER_POST_WINDOW);
|
||||
|
Reference in New Issue
Block a user