mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-29 14:45:58 +01:00
layer-shell: avoid crashes on unmap (#7092)
This commit is contained in:
parent
a9d87bd666
commit
6e6c61b9e8
1 changed files with 1 additions and 1 deletions
|
@ -219,7 +219,7 @@ 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->keyboardFocusable()))
|
||||
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_pSeatManager->setKeyboardFocus(g_pCompositor->m_pLastFocus.lock());
|
||||
|
|
Loading…
Reference in a new issue