From 9391357063b05f3dd748b36b76549b51608e3444 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 29 Jun 2022 14:44:24 +0200 Subject: [PATCH] fix focus on maximize --- src/layout/DwindleLayout.cpp | 2 ++ src/managers/input/InputManager.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index c82c6889..14a679df 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -739,6 +739,8 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree fakeNode.position = PMONITOR->vecPosition + PMONITOR->vecReservedTopLeft; fakeNode.size = PMONITOR->vecSize - PMONITOR->vecReservedTopLeft - PMONITOR->vecReservedBottomRight; fakeNode.workspaceID = pWindow->m_iWorkspaceID; + pWindow->m_vPosition = fakeNode.position; + pWindow->m_vSize = fakeNode.size; applyNodeDataToWindow(&fakeNode); } diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index fe51c494..93a590d8 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -145,7 +145,11 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { // then windows if (!foundSurface) { - pFoundWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords); + if (PWORKSPACE->m_bHasFullscreenWindow && PWORKSPACE->m_efFullscreenMode == FULLSCREEN_MAXIMIZED) + pFoundWindow = g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID); + else + pFoundWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords); + if (pFoundWindow) { if (!pFoundWindow->m_bIsX11) { foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords);