mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-12-22 20:29:48 +01:00
fix scale
This commit is contained in:
parent
22bbffa1ae
commit
5f494286b2
1 changed files with 2 additions and 2 deletions
|
@ -127,7 +127,7 @@ void CHyprpaper::ensurePoolBuffersPresent() {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
auto it = std::find_if(m_vBuffers.begin(), m_vBuffers.end(), [&](const std::unique_ptr<SPoolBuffer>& el) {
|
auto it = std::find_if(m_vBuffers.begin(), m_vBuffers.end(), [&](const std::unique_ptr<SPoolBuffer>& el) {
|
||||||
return el->pTarget == &wt && el->pixelSize == m->size;
|
return el->pTarget == &wt && el->pixelSize == m->size * m->scale;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (it == m_vBuffers.end()) {
|
if (it == m_vBuffers.end()) {
|
||||||
|
@ -305,7 +305,7 @@ void CHyprpaper::destroyBuffer(SPoolBuffer* pBuffer) {
|
||||||
|
|
||||||
SPoolBuffer* CHyprpaper::getPoolBuffer(SMonitor* pMonitor, CWallpaperTarget* pWallpaperTarget) {
|
SPoolBuffer* CHyprpaper::getPoolBuffer(SMonitor* pMonitor, CWallpaperTarget* pWallpaperTarget) {
|
||||||
return std::find_if(m_vBuffers.begin(), m_vBuffers.end(), [&](const std::unique_ptr<SPoolBuffer>& el) {
|
return std::find_if(m_vBuffers.begin(), m_vBuffers.end(), [&](const std::unique_ptr<SPoolBuffer>& el) {
|
||||||
return el->pTarget == pWallpaperTarget && el->pixelSize == pMonitor->size;
|
return el->pTarget == pWallpaperTarget && el->pixelSize == pMonitor->size * pMonitor->scale;
|
||||||
})->get();
|
})->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue