mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-09 15:26:00 +01:00
renderer: use preOffset pos instead of offset
offset is not passed to transformers, so if they change pos, decos will be in the wrong place
This commit is contained in:
parent
95db9108e5
commit
d0367d8560
1 changed files with 4 additions and 2 deletions
|
@ -379,8 +379,10 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
|
||||||
}
|
}
|
||||||
|
|
||||||
// clip box for animated offsets
|
// clip box for animated offsets
|
||||||
Vector2D offset;
|
const Vector2D PREOFFSETPOS = {renderdata.x, renderdata.y};
|
||||||
if (!ignorePosition && pWindow->m_bIsFloating && !pWindow->m_bPinned) {
|
if (!ignorePosition && pWindow->m_bIsFloating && !pWindow->m_bPinned) {
|
||||||
|
Vector2D offset;
|
||||||
|
|
||||||
if (PWORKSPACE->m_vRenderOffset.vec().x != 0) {
|
if (PWORKSPACE->m_vRenderOffset.vec().x != 0) {
|
||||||
const auto PWSMON = g_pCompositor->getMonitorFromID(PWORKSPACE->m_iMonitorID);
|
const auto PWSMON = g_pCompositor->getMonitorFromID(PWORKSPACE->m_iMonitorID);
|
||||||
const auto PROGRESS = PWORKSPACE->m_vRenderOffset.vec().x / PWSMON->vecSize.x;
|
const auto PROGRESS = PWORKSPACE->m_vRenderOffset.vec().x / PWSMON->vecSize.x;
|
||||||
|
@ -422,7 +424,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
|
||||||
|
|
||||||
if (!pWindow->m_bIsFullscreen || PWORKSPACE->m_efFullscreenMode != FULLSCREEN_FULL)
|
if (!pWindow->m_bIsFullscreen || PWORKSPACE->m_efFullscreenMode != FULLSCREEN_FULL)
|
||||||
for (auto& wd : pWindow->m_dWindowDecorations)
|
for (auto& wd : pWindow->m_dWindowDecorations)
|
||||||
wd->draw(pMonitor, renderdata.alpha * renderdata.fadeAlpha, offset);
|
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;
|
static auto* const PXWLUSENN = &g_pConfigManager->getConfigValuePtr("xwayland:use_nearest_neighbor")->intValue;
|
||||||
if (pWindow->m_bIsX11 && *PXWLUSENN)
|
if (pWindow->m_bIsX11 && *PXWLUSENN)
|
||||||
|
|
Loading…
Reference in a new issue