input: don't move monitor focus on wp change (#2320)

This commit is contained in:
Anthony Ruhier 2023-05-17 14:32:59 +02:00 committed by GitHub
parent 9ef7225532
commit d7935356da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1751,7 +1751,7 @@ void CCompositor::swapActiveWorkspaces(CMonitor* pMonitorA, CMonitor* pMonitorB)
updateFullscreenFadeOnWorkspace(PWORKSPACEB);
updateFullscreenFadeOnWorkspace(PWORKSPACEA);
g_pInputManager->refocus();
g_pInputManager->simulateMouseMovement();
// event
g_pEventManager->postEvent(SHyprIPCEvent{"moveworkspace", PWORKSPACEA->m_szName + "," + pMonitorB->szName});
@ -1936,7 +1936,7 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
wlr_cursor_warp(m_sWLRCursor, nullptr, pMonitor->vecPosition.x + pMonitor->vecTransformedSize.x / 2, pMonitor->vecPosition.y + pMonitor->vecTransformedSize.y / 2);
g_pInputManager->refocus();
g_pInputManager->simulateMouseMovement();
}
// finalize

View File

@ -538,7 +538,7 @@ void CMonitor::changeWorkspace(CWorkspace* const pWorkspace, bool internal) {
g_pCompositor->focusWindow(PLASTWINDOW);
else {
g_pCompositor->focusWindow(nullptr);
g_pInputManager->refocus();
g_pInputManager->simulateMouseMovement();
}
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(ID);