renderer: minor fixes to misaligned reported surface rendering
fixes #5257
This commit is contained in:
parent
a9d7526aae
commit
1a0b8d1263
1 changed files with 3 additions and 5 deletions
|
|
@ -91,11 +91,9 @@ static void renderSurface(struct wlr_surface* surface, int x, int y, void* data)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!INTERACTIVERESIZEINPROGRESS && PSURFACE && PWINDOW && PWINDOW->m_vRealSize.goal().floor() > PWINDOW->m_vReportedSize && PWINDOW->m_vReportedSize > Vector2D{1, 1}) {
|
if (!INTERACTIVERESIZEINPROGRESS && PSURFACE && PWINDOW && PWINDOW->m_vRealSize.goal().floor() > PWINDOW->m_vReportedSize && PWINDOW->m_vReportedSize > Vector2D{1, 1}) {
|
||||||
Vector2D coeff = PWINDOW->m_vReportedSize / PWINDOW->m_vRealSize.value();
|
Vector2D size =
|
||||||
Vector2D coeff2 = PWINDOW->m_vReportedSize / PWINDOW->m_vRealSize.goal();
|
Vector2D{windowBox.w * (PWINDOW->m_vReportedSize.x / PWINDOW->m_vRealSize.value().x), windowBox.h * (PWINDOW->m_vReportedSize.y / PWINDOW->m_vRealSize.value().y)};
|
||||||
|
Vector2D correct = Vector2D{windowBox.w, windowBox.h} - size;
|
||||||
Vector2D size = Vector2D{windowBox.w, windowBox.h} * coeff;
|
|
||||||
Vector2D correct = Vector2D{windowBox.w, windowBox.h} - Vector2D{windowBox.w, windowBox.h} * coeff2;
|
|
||||||
|
|
||||||
windowBox.translate(correct / 2.0);
|
windowBox.translate(correct / 2.0);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue