diff options
author | vaxerski <[email protected]> | 2022-08-23 23:15:04 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-08-23 23:15:04 +0200 |
commit | fba7ed97fbb3dfe7c2a9ac45ceef2243624eaa04 (patch) | |
tree | 39e92712312efe4d33f70bf40836fcb2fe6dd865 | |
parent | fd70a9184bf9ae26b5cd831620a46dc039dad5d8 (diff) | |
download | Hyprland-0.11.1beta.tar.gz Hyprland-0.11.1beta.zip |
don't refocus if candidate is last windowv0.11.1beta
-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); |