From 5f494286b2e87361e13b9416b0b046f17b395472 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 16 Jul 2022 23:00:18 +0200 Subject: [PATCH] fix scale --- src/Hyprpaper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Hyprpaper.cpp b/src/Hyprpaper.cpp index c94cf15..3b7e36b 100644 --- a/src/Hyprpaper.cpp +++ b/src/Hyprpaper.cpp @@ -127,7 +127,7 @@ void CHyprpaper::ensurePoolBuffersPresent() { continue; auto it = std::find_if(m_vBuffers.begin(), m_vBuffers.end(), [&](const std::unique_ptr& el) { - return el->pTarget == &wt && el->pixelSize == m->size; + return el->pTarget == &wt && el->pixelSize == m->size * m->scale; }); if (it == m_vBuffers.end()) { @@ -305,7 +305,7 @@ void CHyprpaper::destroyBuffer(SPoolBuffer* pBuffer) { SPoolBuffer* CHyprpaper::getPoolBuffer(SMonitor* pMonitor, CWallpaperTarget* pWallpaperTarget) { return std::find_if(m_vBuffers.begin(), m_vBuffers.end(), [&](const std::unique_ptr& el) { - return el->pTarget == pWallpaperTarget && el->pixelSize == pMonitor->size; + return el->pTarget == pWallpaperTarget && el->pixelSize == pMonitor->size * pMonitor->scale; })->get(); }