diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-08 21:52:52 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-07-08 21:52:52 +0200 |
| commit | e6872bddf4c78ebaddbc3de2aa073afc948faf6b (patch) | |
| tree | b20ea6a047084ccf7c8568c2c950020afbddf8c1 /src/layout/IHyprLayout.cpp | |
| parent | a7a3c0fc1d7087e3b1b51167a6c985b14cf04e82 (diff) | |
fix minor issues with floating windows and fullscreen
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
| -rw-r--r-- | src/layout/IHyprLayout.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 73771e41..9f258b44 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -212,9 +212,23 @@ void IHyprLayout::changeWindowFloatingMode(CWindow* pWindow) { // fix pseudo leaving artifacts g_pHyprRenderer->damageMonitor(g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID)); } else { + pWindow->m_vSize = pWindow->m_vRealSize.vec(); + pWindow->m_vPosition = pWindow->m_vRealPosition.vec(); + onWindowRemovedTiling(pWindow); g_pCompositor->moveWindowToTop(pWindow); + + const auto POS = pWindow->m_vRealPosition.goalv(); + const auto SIZ = pWindow->m_vRealSize.goalv(); + + pWindow->m_vRealPosition.setValueAndWarp(POS + Vector2D(5, 5)); + pWindow->m_vRealSize.setValueAndWarp(SIZ - Vector2D(10, 10)); + + pWindow->m_vRealPosition = POS; + pWindow->m_vRealSize = SIZ; + + g_pHyprRenderer->damageMonitor(g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID)); } } |
