diff options
-rw-r--r-- | src/events/Windows.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index e58e5aff..5fb0041d 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -399,10 +399,12 @@ void Events::listener_unmapWindow(void* owner, void* data) { Debug::log(LOG, "On closed window, new focused candidate is %x", PWINDOWCANDIDATE); - if (!PWINDOWCANDIDATE) - g_pInputManager->refocus(); - else - g_pCompositor->focusWindow(PWINDOWCANDIDATE); + if (PWINDOWCANDIDATE != g_pCompositor->m_pLastWindow) { + if (!PWINDOWCANDIDATE) + g_pInputManager->refocus(); + else + g_pCompositor->focusWindow(PWINDOWCANDIDATE); + } Debug::log(LOG, "Destroying the SubSurface tree of unmapped window %x", PWINDOW); SubsurfaceTree::destroySurfaceTree(PWINDOW->m_pSurfaceTree); |