don't refocus if candidate is last window

This commit is contained in:
vaxerski 2022-08-23 23:15:04 +02:00
parent fd70a9184b
commit fba7ed97fb

View file

@ -399,10 +399,12 @@ void Events::listener_unmapWindow(void* owner, void* data) {
Debug::log(LOG, "On closed window, new focused candidate is %x", PWINDOWCANDIDATE); Debug::log(LOG, "On closed window, new focused candidate is %x", PWINDOWCANDIDATE);
if (!PWINDOWCANDIDATE) if (PWINDOWCANDIDATE != g_pCompositor->m_pLastWindow) {
g_pInputManager->refocus(); if (!PWINDOWCANDIDATE)
else g_pInputManager->refocus();
g_pCompositor->focusWindow(PWINDOWCANDIDATE); else
g_pCompositor->focusWindow(PWINDOWCANDIDATE);
}
Debug::log(LOG, "Destroying the SubSurface tree of unmapped window %x", PWINDOW); Debug::log(LOG, "Destroying the SubSurface tree of unmapped window %x", PWINDOW);
SubsurfaceTree::destroySurfaceTree(PWINDOW->m_pSurfaceTree); SubsurfaceTree::destroySurfaceTree(PWINDOW->m_pSurfaceTree);