From 7e5ba5e824f959d1f278b3b35033f382a6364bce Mon Sep 17 00:00:00 2001 From: dtop129 <45855999+dtop129@users.noreply.github.com> Date: Sat, 6 May 2023 17:13:26 +0200 Subject: [PATCH] Fixed wrong focus changes when moving background workspaces (#2258) --- src/Compositor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 8d2fbb7b1..4c6af7ab1 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1931,6 +1931,8 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni pWorkspace->startAnim(true, true, true); wlr_cursor_warp(m_sWLRCursor, nullptr, pMonitor->vecPosition.x + pMonitor->vecTransformedSize.x / 2, pMonitor->vecPosition.y + pMonitor->vecTransformedSize.y / 2); + + g_pInputManager->refocus(); } // finalize @@ -1939,8 +1941,6 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni updateFullscreenFadeOnWorkspace(pWorkspace); updateFullscreenFadeOnWorkspace(getWorkspaceByID(POLDMON->activeWorkspace)); - g_pInputManager->refocus(); - // event g_pEventManager->postEvent(SHyprIPCEvent{"moveworkspace", pWorkspace->m_szName + "," + pMonitor->szName}); EMIT_HOOK_EVENT("moveWorkspace", (std::vector{pWorkspace, pMonitor}));