mirror of
https://github.com/hyprwm/Hyprland
synced 2025-02-17 00:22:07 +01:00
damageSurface: don't correct smallVec twice
This commit is contained in:
parent
863c7b6072
commit
7d989f2cf0
1 changed files with 1 additions and 7 deletions
|
@ -1709,19 +1709,13 @@ void CHyprRenderer::damageSurface(wlr_surface* pSurface, double x, double y, dou
|
||||||
if (g_pCompositor->m_bUnsafeState)
|
if (g_pCompositor->m_bUnsafeState)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto* const PSURFACE = CWLSurface::surfaceFromWlr(pSurface);
|
|
||||||
if (PSURFACE && PSURFACE->small()) {
|
|
||||||
const auto CORRECTION = PSURFACE->correctSmallVec();
|
|
||||||
x += CORRECTION.x;
|
|
||||||
y += CORRECTION.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto WLSURF = CWLSurface::surfaceFromWlr(pSurface);
|
const auto WLSURF = CWLSurface::surfaceFromWlr(pSurface);
|
||||||
CRegion damageBox = WLSURF ? WLSURF->logicalDamage() : CRegion{};
|
CRegion damageBox = WLSURF ? WLSURF->logicalDamage() : CRegion{};
|
||||||
if (!WLSURF) {
|
if (!WLSURF) {
|
||||||
Debug::log(ERR, "BUG THIS: No CWLSurface for surface in damageSurface!!!");
|
Debug::log(ERR, "BUG THIS: No CWLSurface for surface in damageSurface!!!");
|
||||||
wlr_surface_get_effective_damage(pSurface, damageBox.pixman());
|
wlr_surface_get_effective_damage(pSurface, damageBox.pixman());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scale != 1.0)
|
if (scale != 1.0)
|
||||||
damageBox.scale(scale);
|
damageBox.scale(scale);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue