mirror of
https://git.allpurposem.at/mat/WiggleWobble.git
synced 2025-12-23 13:01:28 +01:00
hack: force all windows to be slightly translucent always. this is bad!!
This commit is contained in:
parent
0a0161ee62
commit
8ac7e8d169
@ -31,10 +31,6 @@ class CBindOwnFramebufferPassElement final: public IPassElement {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
CRegion opaqueRegion() override {
|
||||
return CRegion {};
|
||||
}
|
||||
|
||||
private:
|
||||
CFramebuffer* m_pFramebuffer;
|
||||
};
|
||||
@ -71,10 +67,6 @@ class CRenderWobblyWindowPassElement final: public IPassElement {
|
||||
|
||||
std::optional<CBox> boundingBox() override;
|
||||
|
||||
CRegion opaqueRegion() override {
|
||||
return CRegion {};
|
||||
}
|
||||
|
||||
private:
|
||||
CFramebuffer* m_pOldFramebuffer;
|
||||
PHLWINDOWREF m_pWindow;
|
||||
|
||||
@ -174,7 +174,7 @@ void hkRenderWindow(
|
||||
pWindow->m_floatingOffset -= Vector2D {windowBox.x, windowBox.y};
|
||||
|
||||
// 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));
|
||||
}
|
||||
@ -195,7 +195,7 @@ void hkRenderWindow(
|
||||
pWindow->m_floatingOffset += Vector2D {windowBox.x, windowBox.y};
|
||||
|
||||
// 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(
|
||||
makeUnique<CRenderWobblyWindowPassElement>(pOldFramebuffer, pWindow)
|
||||
|
||||
@ -208,5 +208,10 @@ void CRenderWobblyWindowPassElement::draw(const CRegion& damage) {
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user