resize transition fixes + default transitions to false

This commit is contained in:
vaxerski 2022-11-06 18:10:53 +00:00
parent f755351511
commit efbc3f8194
2 changed files with 25 additions and 24 deletions

View file

@ -105,7 +105,7 @@ void CConfigManager::setDefaultVars() {
configValues["master:no_gaps_when_only"].intValue = 0;
configValues["animations:enabled"].intValue = 1;
configValues["animations:use_resize_transitions"].intValue = 1;
configValues["animations:use_resize_transitions"].intValue = 0;
configValues["animations:speed"].floatValue = 7.f;
configValues["animations:curve"].strValue = "default";
configValues["animations:windows_style"].strValue = STRVAL_EMPTY;

View file

@ -261,6 +261,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
// clip box for animated offsets
Vector2D offset;
if (!ignorePosition) {
if (PWORKSPACE->m_vRenderOffset.vec().x != 0) {
const auto PWSMON = g_pCompositor->getMonitorFromID(PWORKSPACE->m_iMonitorID);
const auto PROGRESS = PWORKSPACE->m_vRenderOffset.vec().x / PWSMON->vecSize.x;
@ -285,9 +286,9 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
renderdata.x += offset.x;
renderdata.y += offset.y;
}
// render window decorations first, if not fullscreen full
if (mode == RENDER_PASS_ALL || mode == RENDER_PASS_MAIN) {
if (!pWindow->m_bIsFullscreen || PWORKSPACE->m_efFullscreenMode != FULLSCREEN_FULL) for (auto& wd : pWindow->m_dWindowDecorations)
wd->draw(pMonitor, renderdata.alpha * renderdata.fadeAlpha / 255.f, offset);
@ -298,7 +299,7 @@ void CHyprRenderer::renderWindow(CWindow* pWindow, CMonitor* pMonitor, timespec*
const auto PFB = g_pHyprOpenGL->m_mWindowResizeFramebuffers.find(pWindow);
if (PFB != g_pHyprOpenGL->m_mWindowResizeFramebuffers.end() && PFB->second.isAllocated()) {
wlr_box box = {renderdata.x, renderdata.y, renderdata.w, renderdata.h};
wlr_box box = {renderdata.x - pMonitor->vecPosition.x, renderdata.y - pMonitor->vecPosition.y, renderdata.w, renderdata.h};
// adjust UV (remove when I figure out how to change the size of the fb)
g_pHyprOpenGL->m_RenderData.primarySurfaceUVTopLeft = {0, 0};