mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 11:45:58 +01:00
renderer: scaled surfaces could have zero area (#8423)
This commit is contained in:
parent
07052a515b
commit
a551f85b91
1 changed files with 5 additions and 5 deletions
|
@ -222,6 +222,11 @@ static void renderSurface(SP<CWLSurfaceResource> surface, int x, int y, void* da
|
||||||
windowBox.height = RDATA->h - y;
|
windowBox.height = RDATA->h - y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto PROJSIZEUNSCALED = windowBox.size();
|
||||||
|
|
||||||
|
windowBox.scale(RDATA->pMonitor->scale);
|
||||||
|
windowBox.round();
|
||||||
|
|
||||||
if (windowBox.width <= 1 || windowBox.height <= 1) {
|
if (windowBox.width <= 1 || windowBox.height <= 1) {
|
||||||
if (!g_pHyprRenderer->m_bBlockSurfaceFeedback) {
|
if (!g_pHyprRenderer->m_bBlockSurfaceFeedback) {
|
||||||
Debug::log(TRACE, "presentFeedback for invisible surface");
|
Debug::log(TRACE, "presentFeedback for invisible surface");
|
||||||
|
@ -231,11 +236,6 @@ static void renderSurface(SP<CWLSurfaceResource> surface, int x, int y, void* da
|
||||||
return; // invisible
|
return; // invisible
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto PROJSIZEUNSCALED = windowBox.size();
|
|
||||||
|
|
||||||
windowBox.scale(RDATA->pMonitor->scale);
|
|
||||||
windowBox.round();
|
|
||||||
|
|
||||||
const bool MISALIGNEDFSV1 = std::floor(RDATA->pMonitor->scale) != RDATA->pMonitor->scale /* Fractional */ && surface->current.scale == 1 /* fs protocol */ &&
|
const bool MISALIGNEDFSV1 = std::floor(RDATA->pMonitor->scale) != RDATA->pMonitor->scale /* Fractional */ && surface->current.scale == 1 /* fs protocol */ &&
|
||||||
windowBox.size() != surface->current.bufferSize /* misaligned */ && DELTALESSTHAN(windowBox.width, surface->current.bufferSize.x, 3) &&
|
windowBox.size() != surface->current.bufferSize /* misaligned */ && DELTALESSTHAN(windowBox.width, surface->current.bufferSize.x, 3) &&
|
||||||
DELTALESSTHAN(windowBox.height, surface->current.bufferSize.y, 3) /* off by one-or-two */ &&
|
DELTALESSTHAN(windowBox.height, surface->current.bufferSize.y, 3) /* off by one-or-two */ &&
|
||||||
|
|
Loading…
Reference in a new issue