hack: force all windows to be slightly translucent always. this is bad!!

This commit is contained in:
Matias 2025-07-17 19:08:58 +02:00
parent 0a0161ee62
commit 8ac7e8d169
No known key found for this signature in database
GPG Key ID: ED35A6AC65A06B69
3 changed files with 8 additions and 11 deletions

View File

@ -31,10 +31,6 @@ class CBindOwnFramebufferPassElement final: public IPassElement {
return std::nullopt; return std::nullopt;
} }
CRegion opaqueRegion() override {
return CRegion {};
}
private: private:
CFramebuffer* m_pFramebuffer; CFramebuffer* m_pFramebuffer;
}; };
@ -71,10 +67,6 @@ class CRenderWobblyWindowPassElement final: public IPassElement {
std::optional<CBox> boundingBox() override; std::optional<CBox> boundingBox() override;
CRegion opaqueRegion() override {
return CRegion {};
}
private: private:
CFramebuffer* m_pOldFramebuffer; CFramebuffer* m_pOldFramebuffer;
PHLWINDOWREF m_pWindow; PHLWINDOWREF m_pWindow;

View File

@ -174,7 +174,7 @@ void hkRenderWindow(
pWindow->m_floatingOffset -= Vector2D {windowBox.x, windowBox.y}; pWindow->m_floatingOffset -= Vector2D {windowBox.x, windowBox.y};
// HACK: otherwise renderWindow will set an opaque region at top-left // HACK: otherwise renderWindow will set an opaque region at top-left
pWindow->m_alpha->setValueAndWarp(pWindow->m_alpha->goal() - 0.001f); pWindow->m_alpha->setValueAndWarp(0.999f);
pRenderer->m_renderPass.add(makeUnique<CBindOwnFramebufferPassElement>(&windowFB)); pRenderer->m_renderPass.add(makeUnique<CBindOwnFramebufferPassElement>(&windowFB));
} }
@ -195,7 +195,7 @@ void hkRenderWindow(
pWindow->m_floatingOffset += Vector2D {windowBox.x, windowBox.y}; pWindow->m_floatingOffset += Vector2D {windowBox.x, windowBox.y};
// HACK: this might interfere with anims, but it's all I got // HACK: this might interfere with anims, but it's all I got
pWindow->m_alpha->setValueAndWarp(pWindow->m_alpha->goal() + 0.001f); // pWindow->m_alpha->setValueAndWarp(pWindow->m_alpha->goal() + 0.001f);
pRenderer->m_renderPass.add( pRenderer->m_renderPass.add(
makeUnique<CRenderWobblyWindowPassElement>(pOldFramebuffer, pWindow) makeUnique<CRenderWobblyWindowPassElement>(pOldFramebuffer, pWindow)

View File

@ -208,5 +208,10 @@ void CRenderWobblyWindowPassElement::draw(const CRegion& damage) {
} }
std::optional<CBox> CRenderWobblyWindowPassElement::boundingBox() { std::optional<CBox> CRenderWobblyWindowPassElement::boundingBox() {
return g_pHyprOpenGL->m_renderData.pMonitor->logicalBox(); auto ret = m_pWindow->getFullWindowBoundingBox();
const auto wobbleBox = g_wobblyWindows.at(PHLWINDOWREF {m_pWindow}).getBox();
ret.scale(Vector2D {wobbleBox.width, wobbleBox.height});
ret.translate(Vector2D {wobbleBox.x, wobbleBox.y});
return ret;
} }