add changefloatingmode event

This commit is contained in:
vaxerski 2022-12-09 18:51:44 +00:00
parent d5352a5d12
commit bf78dcecf0
1 changed files with 3 additions and 0 deletions

View File

@ -299,6 +299,9 @@ void IHyprLayout::changeWindowFloatingMode(CWindow* pWindow) {
const auto TILED = isWindowTiled(pWindow);
// event
g_pEventManager->postEvent(SHyprIPCEvent{ "changefloatingmode", getFormat("%x,%d", pWindow, (int)TILED) });
if (!TILED) {
const auto PNEWMON = g_pCompositor->getMonitorFromVector(pWindow->m_vRealPosition.vec() + pWindow->m_vRealSize.vec() / 2.f);
pWindow->m_iMonitorID = PNEWMON->ID;