From ff9e059de6dd30c813270ff5a74053339cc94765 Mon Sep 17 00:00:00 2001 From: Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:21:04 +0000 Subject: window: move size reporting to animation begin callback (#9298) * window: fix resizes with an update callback * window: fixup sendWindowSize Remove the size argument from sendWindowSize, since it is now a member of the Window class and we don't want any mismatches between m_vRealSize and what we report. Remove sendWindowSize from mapWindow, since we shouldn't need it. * window: sendWindowSize on animation begin * window: move most calls to sendWindowSize to the animation begin callback * window: remove sendWindowSize in unmanaged if not fullscreen --- src/managers/KeybindManager.cpp | 1 - src/managers/XWaylandManager.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src/managers') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index 2d6b2cb8..8daa6838 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -1908,7 +1908,6 @@ SDispatchResult CKeybindManager::workspaceOpt(std::string args) { if (PWORKSPACE->m_bDefaultFloating) { w->m_vRealPosition->setValueAndWarp(SAVEDPOS); w->m_vRealSize->setValueAndWarp(SAVEDSIZE); - w->sendWindowSize(SAVEDSIZE); *w->m_vRealSize = w->m_vRealSize->value() + Vector2D(4, 4); *w->m_vRealPosition = w->m_vRealPosition->value() - Vector2D(2, 2); } diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index a5506329..63b14962 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -55,7 +55,7 @@ void CHyprXWaylandManager::activateWindow(PHLWINDOW pWindow, bool activate) { if (pWindow->m_bIsX11) { if (activate) { - pWindow->sendWindowSize(pWindow->m_vRealSize->value(), true); // update xwayland output pos + pWindow->sendWindowSize(true); // update xwayland output pos pWindow->m_pXWaylandSurface->setMinimized(false); if (!pWindow->isX11OverrideRedirect()) -- cgit v1.2.3