remove resize transitions

This commit is contained in:
vaxerski
2022-11-22 17:20:58 +00:00
parent 95047fb083
commit 5327565b33
4 changed files with 0 additions and 40 deletions

View File

@@ -1072,29 +1072,11 @@ void CHyprOpenGLImpl::makeLayerSnapshot(SLayerSurface* pLayer) {
}
void CHyprOpenGLImpl::onWindowResizeStart(CWindow* pWindow) {
static auto *const PTRANSITIONS = &g_pConfigManager->getConfigValuePtr("animations:use_resize_transitions")->intValue;
static auto *const PENABLED = &g_pConfigManager->getConfigValuePtr("animations:enabled")->intValue;
if (!*PTRANSITIONS || !*PENABLED)
return;
if (pWindow->m_vRealSize.vec().x < 5 || pWindow->m_vRealSize.vec().y < 5)
return;
// make a fb and render a snapshot
const auto PFRAMEBUFFER = &m_mWindowResizeFramebuffers[pWindow];
makeRawWindowSnapshot(pWindow, PFRAMEBUFFER);
}
void CHyprOpenGLImpl::onWindowResizeEnd(CWindow* pWindow) {
static auto *const PTRANSITIONS = &g_pConfigManager->getConfigValuePtr("animations:use_resize_transitions")->intValue;
static auto *const PENABLED = &g_pConfigManager->getConfigValuePtr("animations:enabled")->intValue;
if (!*PTRANSITIONS || !*PENABLED)
return;
// remove the fb
m_mWindowResizeFramebuffers.erase(pWindow);
}
void CHyprOpenGLImpl::renderSnapshot(CWindow** pWindow) {