rules/windowRuleApplicator: fix min/max size effects (#12491)
fixes #12412
This commit is contained in:
parent
d7f26038ee
commit
42447a50d6
19 changed files with 171 additions and 93 deletions
|
|
@ -68,7 +68,7 @@ CScreencopyFrame::CScreencopyFrame(SP<CZwlrScreencopyFrameV1> resource_, int32_t
|
|||
m_box = box_;
|
||||
|
||||
const auto POS = m_box.pos() * m_monitor->m_scale;
|
||||
m_box.transform(wlTransformToHyprutils(m_monitor->m_transform), m_monitor->m_pixelSize.x, m_monitor->m_pixelSize.y).scale(m_monitor->m_scale).round();
|
||||
m_box.transform(Math::wlTransformToHyprutils(m_monitor->m_transform), m_monitor->m_pixelSize.x, m_monitor->m_pixelSize.y).scale(m_monitor->m_scale).round();
|
||||
m_box.x = POS.x;
|
||||
m_box.y = POS.y;
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ void CScreencopyFrame::renderMon() {
|
|||
|
||||
CBox monbox = CBox{0, 0, m_monitor->m_pixelSize.x, m_monitor->m_pixelSize.y}
|
||||
.translate({-m_box.x, -m_box.y}) // vvvv kinda ass-backwards but that's how I designed the renderer... sigh.
|
||||
.transform(wlTransformToHyprutils(invertTransform(m_monitor->m_transform)), m_monitor->m_pixelSize.x, m_monitor->m_pixelSize.y);
|
||||
.transform(Math::wlTransformToHyprutils(Math::invertTransform(m_monitor->m_transform)), m_monitor->m_pixelSize.x, m_monitor->m_pixelSize.y);
|
||||
g_pHyprOpenGL->pushMonitorTransformEnabled(true);
|
||||
g_pHyprOpenGL->setRenderModifEnabled(false);
|
||||
g_pHyprOpenGL->renderTexture(TEXTURE, monbox,
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ CToplevelExportFrame::CToplevelExportFrame(SP<CHyprlandToplevelExportFrameV1> re
|
|||
|
||||
m_box = {0, 0, sc<int>(m_window->m_realSize->value().x * PMONITOR->m_scale), sc<int>(m_window->m_realSize->value().y * PMONITOR->m_scale)};
|
||||
|
||||
m_box.transform(wlTransformToHyprutils(PMONITOR->m_transform), PMONITOR->m_transformedSize.x, PMONITOR->m_transformedSize.y).round();
|
||||
m_box.transform(Math::wlTransformToHyprutils(PMONITOR->m_transform), PMONITOR->m_transformedSize.x, PMONITOR->m_transformedSize.y).round();
|
||||
|
||||
m_shmStride = NFormatUtils::minStride(PSHMINFO, m_box.w);
|
||||
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ void CWLSurfaceResource::commitState(SSurfaceState& state) {
|
|||
}
|
||||
|
||||
if (m_current.texture)
|
||||
m_current.texture->m_transform = wlTransformToHyprutils(m_current.transform);
|
||||
m_current.texture->m_transform = Math::wlTransformToHyprutils(m_current.transform);
|
||||
|
||||
if (m_role->role() == SURFACE_ROLE_SUBSURFACE) {
|
||||
auto subsurface = sc<CSubsurfaceRole*>(m_role.get())->m_subsurface.lock();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ CRegion SSurfaceState::accumulateBufferDamage() {
|
|||
|
||||
Vector2D trc = transform % 2 == 1 ? Vector2D{bufferSize.y, bufferSize.x} : bufferSize;
|
||||
|
||||
bufferDamage = surfaceDamage.scale(scale).transform(wlTransformToHyprutils(invertTransform(transform)), trc.x, trc.y).add(bufferDamage);
|
||||
bufferDamage = surfaceDamage.scale(scale).transform(Math::wlTransformToHyprutils(Math::invertTransform(transform)), trc.x, trc.y).add(bufferDamage);
|
||||
damage.clear();
|
||||
return bufferDamage;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue