diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-04-07 20:52:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-07 20:52:11 +0200 |
| commit | 70ae99f52162a0ed2723d45c63adfb2e61f4e2f5 (patch) | |
| tree | b3f5f8d3b781c4606e4a2f6b812459fed54a71b5 /src/desktop/LayerSurface.cpp | |
| parent | a8eda7f978ed367969d0de2adc836ceb268ccd54 (diff) | |
input/layers: Fix exclusive LS focus / refocus after unmap (#9984)
Diffstat (limited to 'src/desktop/LayerSurface.cpp')
| -rw-r--r-- | src/desktop/LayerSurface.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/desktop/LayerSurface.cpp b/src/desktop/LayerSurface.cpp index 428dcbbc..8747d079 100644 --- a/src/desktop/LayerSurface.cpp +++ b/src/desktop/LayerSurface.cpp @@ -234,9 +234,10 @@ void CLayerSurface::onUnmap() { // refocus if needed // vvvvvvvvvvvvv if there is a last focus and the last focus is not keyboard focusable, fallback to window - if (WASLASTFOCUS || (g_pCompositor->m_pLastFocus && g_pCompositor->m_pLastFocus->hlSurface && !g_pCompositor->m_pLastFocus->hlSurface->keyboardFocusable())) - g_pInputManager->refocusLastWindow(PMONITOR); - else if (g_pCompositor->m_pLastFocus && g_pCompositor->m_pLastFocus != surface->resource()) + if (WASLASTFOCUS || (g_pCompositor->m_pLastFocus && g_pCompositor->m_pLastFocus->hlSurface && !g_pCompositor->m_pLastFocus->hlSurface->keyboardFocusable())) { + if (!g_pInputManager->refocusLastWindow(PMONITOR)) + g_pInputManager->refocus(); + } else if (g_pCompositor->m_pLastFocus && g_pCompositor->m_pLastFocus != surface->resource()) g_pSeatManager->setKeyboardFocus(g_pCompositor->m_pLastFocus.lock()); CBox geomFixed = {geometry.x + PMONITOR->vecPosition.x, geometry.y + PMONITOR->vecPosition.y, geometry.width, geometry.height}; |
