diff options
author | vaxerski <[email protected]> | 2022-05-14 20:56:21 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-05-14 20:56:21 +0200 |
commit | deb18af955f5282c1c37a3cfcce85cfbd717d418 (patch) | |
tree | cc68615a7062bf7cd9e8582e0e9da2aba0f685c6 | |
parent | e8a432e97969f9f74a46f1e89dd90ae052f0c660 (diff) | |
download | Hyprland-deb18af955f5282c1c37a3cfcce85cfbd717d418.tar.gz Hyprland-deb18af955f5282c1c37a3cfcce85cfbd717d418.zip |
Protect against crash in focusWindow
-rw-r--r-- | src/Compositor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index cd3fed1d..32a3ffde 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -402,13 +402,13 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { return; } - if (pWindow->m_bNoFocus) { - Debug::log(LOG, "Ignoring focus to nofocus window!"); + if (!pWindow || !windowValidMapped(pWindow)) { + wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat); return; } - if (!pWindow || !windowValidMapped(pWindow)) { - wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat); + if (pWindow->m_bNoFocus) { + Debug::log(LOG, "Ignoring focus to nofocus window!"); return; } |