decos: recalc on add

This commit is contained in:
vaxerski 2023-05-23 14:26:38 +02:00
parent 799add8659
commit eb1f832fce
4 changed files with 11 additions and 1 deletions

View file

@ -10,7 +10,8 @@
#include "helpers/Vector2D.hpp"
#include "helpers/WLSurface.hpp"
enum eIdleInhibitMode {
enum eIdleInhibitMode
{
IDLEINHIBIT_NONE = 0,
IDLEINHIBIT_ALWAYS,
IDLEINHIBIT_FULLSCREEN,

View file

@ -316,6 +316,8 @@ void CHyprDwindleLayout::onWindowCreatedTiling(CWindow* pWindow) {
OPENINGON->pWindow->insertWindowToGroup(pWindow);
pWindow->m_dWindowDecorations.emplace_back(std::make_unique<CHyprGroupBarDecoration>(pWindow));
pWindow->updateWindowDecos();
recalculateWindow(pWindow);
return;
}

View file

@ -1165,6 +1165,7 @@ void CKeybindManager::toggleGroup(std::string args) {
PWINDOW->m_dWindowDecorations.emplace_back(std::make_unique<CHyprGroupBarDecoration>(PWINDOW));
PWINDOW->updateWindowDecos();
g_pLayoutManager->getCurrentLayout()->recalculateWindow(PWINDOW);
} else {
if (PWINDOW->m_sGroupData.pNextWindow == PWINDOW) {
PWINDOW->m_sGroupData.pNextWindow = nullptr;
@ -1999,6 +2000,9 @@ void CKeybindManager::moveIntoGroup(std::string args) {
PWINDOWINDIR->insertWindowToGroup(PWINDOW);
PWINDOW->m_dWindowDecorations.emplace_back(std::make_unique<CHyprGroupBarDecoration>(PWINDOW));
PWINDOW->updateWindowDecos();
g_pLayoutManager->getCurrentLayout()->recalculateWindow(PWINDOW);
}
void CKeybindManager::moveOutOfGroup(std::string args) {

View file

@ -120,6 +120,9 @@ APICALL bool HyprlandAPI::addWindowDecoration(HANDLE handle, CWindow* pWindow, I
pWindow->m_dWindowDecorations.emplace_back(pDecoration);
pWindow->updateWindowDecos();
g_pLayoutManager->getCurrentLayout()->recalculateWindow(pWindow);
return true;
}