diff options
| author | Vaxry <vaxry@vaxry.net> | 2023-11-03 19:07:11 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2023-11-03 19:12:09 +0000 |
| commit | 9d2a5fb41752c0dcc8e863d7e98b541656584dd9 (patch) | |
| tree | fbb8a9eb5d1d494b523e9149bf80562622ac704c /src/helpers/WLSurface.cpp | |
| parent | ed3d5053b23d2b725cda507cb5fcc9e9a2f35ba9 (diff) | |
renderer: improvements to wayland surface small() detection
Diffstat (limited to 'src/helpers/WLSurface.cpp')
| -rw-r--r-- | src/helpers/WLSurface.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helpers/WLSurface.cpp b/src/helpers/WLSurface.cpp index ffd764a1..33109b94 100644 --- a/src/helpers/WLSurface.cpp +++ b/src/helpers/WLSurface.cpp @@ -31,7 +31,7 @@ bool CWLSurface::small() const { if (!m_pOwner || !exists()) return false; - return m_pOwner->m_vReportedSize.x > m_pWLRSurface->current.buffer_width || m_pOwner->m_vReportedSize.y > m_pWLRSurface->current.buffer_height; + return std::abs(m_pOwner->m_vReportedSize.x - m_pWLRSurface->current.buffer_width) > 1 || std::abs(m_pOwner->m_vReportedSize.y - m_pWLRSurface->current.buffer_height) > 1; } Vector2D CWLSurface::correctSmallVec() const { |
