mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-04 19:06:01 +01:00
fix mirrors, thanks virtcode
This commit is contained in:
parent
c1503223b8
commit
18f13c0c57
2 changed files with 7 additions and 7 deletions
|
@ -2436,11 +2436,11 @@ void CHyprOpenGLImpl::renderMirrored() {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// replace monitor projection to undo the mirrored monitor's projection
|
// replace monitor projection to undo the mirrored monitor's projection
|
||||||
matrixIdentity(monitor->projMatrix.data());
|
matrixIdentity(m_RenderData.monitorProjection.data());
|
||||||
matrixTranslate(monitor->projMatrix.data(), monitor->vecPixelSize.x / 2.0, monitor->vecPixelSize.y / 2.0);
|
matrixTranslate(m_RenderData.monitorProjection.data(), monitor->vecPixelSize.x / 2.0, monitor->vecPixelSize.y / 2.0);
|
||||||
matrixTransform(monitor->projMatrix.data(), wlTransformToHyprutils(monitor->transform));
|
matrixTransform(m_RenderData.monitorProjection.data(), wlTransformToHyprutils(monitor->transform));
|
||||||
matrixTransform(monitor->projMatrix.data(), wlTransformToHyprutils(invertTransform(mirrored->transform)));
|
matrixTransform(m_RenderData.monitorProjection.data(), wlTransformToHyprutils(invertTransform(mirrored->transform)));
|
||||||
matrixTranslate(monitor->projMatrix.data(), -monitor->vecTransformedSize.x / 2.0, -monitor->vecTransformedSize.y / 2.0);
|
matrixTranslate(m_RenderData.monitorProjection.data(), -monitor->vecTransformedSize.x / 2.0, -monitor->vecTransformedSize.y / 2.0);
|
||||||
|
|
||||||
// clear stuff outside of mirrored area (e.g. when changing to mirrored)
|
// clear stuff outside of mirrored area (e.g. when changing to mirrored)
|
||||||
clear(CColor(0, 0, 0, 0));
|
clear(CColor(0, 0, 0, 0));
|
||||||
|
@ -2448,7 +2448,7 @@ void CHyprOpenGLImpl::renderMirrored() {
|
||||||
renderTexture(PFB->m_cTex, &monbox, 1.f, 0, false, false);
|
renderTexture(PFB->m_cTex, &monbox, 1.f, 0, false, false);
|
||||||
|
|
||||||
// reset matrix for further drawing
|
// reset matrix for further drawing
|
||||||
monitor->updateMatrix();
|
m_RenderData.monitorProjection = monitor->projMatrix;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHyprOpenGLImpl::renderSplash(cairo_t* const CAIRO, cairo_surface_t* const CAIROSURFACE, double offsetY, const Vector2D& size) {
|
void CHyprOpenGLImpl::renderSplash(cairo_t* const CAIRO, cairo_surface_t* const CAIROSURFACE, double offsetY, const Vector2D& size) {
|
||||||
|
|
|
@ -1397,7 +1397,7 @@ void CHyprRenderer::renderMonitor(CMonitor* pMonitor) {
|
||||||
TRACY_GPU_COLLECT;
|
TRACY_GPU_COLLECT;
|
||||||
|
|
||||||
if (!pMonitor->mirrors.empty()) {
|
if (!pMonitor->mirrors.empty()) {
|
||||||
CRegion frameDamage{};
|
CRegion frameDamage{finalDamage};
|
||||||
|
|
||||||
const auto TRANSFORM = invertTransform(pMonitor->transform);
|
const auto TRANSFORM = invertTransform(pMonitor->transform);
|
||||||
frameDamage.transform(wlTransformToHyprutils(TRANSFORM), pMonitor->vecTransformedSize.x, pMonitor->vecTransformedSize.y);
|
frameDamage.transform(wlTransformToHyprutils(TRANSFORM), pMonitor->vecTransformedSize.x, pMonitor->vecTransformedSize.y);
|
||||||
|
|
Loading…
Reference in a new issue