mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-12-29 02:33:05 +03:00
Fixed wrong focus changes when moving background workspaces (#2258)
This commit is contained in:
parent
83cd5e2ebd
commit
7e5ba5e824
@ -1931,6 +1931,8 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
|
|||||||
pWorkspace->startAnim(true, true, true);
|
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);
|
wlr_cursor_warp(m_sWLRCursor, nullptr, pMonitor->vecPosition.x + pMonitor->vecTransformedSize.x / 2, pMonitor->vecPosition.y + pMonitor->vecTransformedSize.y / 2);
|
||||||
|
|
||||||
|
g_pInputManager->refocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
// finalize
|
// finalize
|
||||||
@ -1939,8 +1941,6 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
|
|||||||
updateFullscreenFadeOnWorkspace(pWorkspace);
|
updateFullscreenFadeOnWorkspace(pWorkspace);
|
||||||
updateFullscreenFadeOnWorkspace(getWorkspaceByID(POLDMON->activeWorkspace));
|
updateFullscreenFadeOnWorkspace(getWorkspaceByID(POLDMON->activeWorkspace));
|
||||||
|
|
||||||
g_pInputManager->refocus();
|
|
||||||
|
|
||||||
// event
|
// event
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"moveworkspace", pWorkspace->m_szName + "," + pMonitor->szName});
|
g_pEventManager->postEvent(SHyprIPCEvent{"moveworkspace", pWorkspace->m_szName + "," + pMonitor->szName});
|
||||||
EMIT_HOOK_EVENT("moveWorkspace", (std::vector<void*>{pWorkspace, pMonitor}));
|
EMIT_HOOK_EVENT("moveWorkspace", (std::vector<void*>{pWorkspace, pMonitor}));
|
||||||
|
Loading…
Reference in New Issue
Block a user