From d7935356da16beaf7667af60d2e7fb46cc202599 Mon Sep 17 00:00:00 2001 From: Anthony Ruhier Date: Wed, 17 May 2023 14:32:59 +0200 Subject: [PATCH] input: don't move monitor focus on wp change (#2320) --- src/Compositor.cpp | 4 ++-- src/helpers/Monitor.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 39c17a36..36dd2bf2 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -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 diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 166a18d4..69d63494 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -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);