diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-03 12:03:18 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-03 12:03:18 +0200 |
| commit | c779a7c03bef72aff78c14a29f5ba106de50b8d6 (patch) | |
| tree | bec90adb6e4d758f91ab0f246c07b34d87b497a6 /src | |
| parent | 179e5188a4b0a4a78799cf47891afc91b61ca0be (diff) | |
move refocus on only unmap
Diffstat (limited to 'src')
| -rw-r--r-- | src/events/Windows.cpp | 4 | ||||
| -rw-r--r-- | src/managers/input/InputManager.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index ff4b147f..fa080dd7 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -383,6 +383,10 @@ void Events::listener_unmapWindow(void* owner, void* data) { // refocus on a new window g_pInputManager->refocus(); + if (!g_pCompositor->m_pLastWindow) { + g_pCompositor->focusWindow(g_pCompositor->getFirstWindowOnWorkspace(PWORKSPACE->m_iID)); + } + Debug::log(LOG, "Destroying the SubSurface tree of unmapped window %x", PWINDOW); SubsurfaceTree::destroySurfaceTree(PWINDOW->m_pSurfaceTree); diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index 8dbff347..d0783533 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -183,9 +183,6 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { } else pFoundWindow = g_pCompositor->vectorToWindowIdeal(mouseCoords); - if (!pFoundWindow && refocus) - pFoundWindow = g_pCompositor->getFirstWindowOnWorkspace(PWORKSPACE->m_iID); - if (pFoundWindow) { if (!pFoundWindow->m_bIsX11) { foundSurface = g_pCompositor->vectorWindowToSurface(mouseCoords, pFoundWindow, surfaceCoords); |
