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(); }