diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-14 20:56:21 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-05-14 20:56:21 +0200 |
| commit | deb18af955f5282c1c37a3cfcce85cfbd717d418 (patch) | |
| tree | cc68615a7062bf7cd9e8582e0e9da2aba0f685c6 /src/Compositor.cpp | |
| parent | e8a432e97969f9f74a46f1e89dd90ae052f0c660 (diff) | |
Protect against crash in focusWindow
Diffstat (limited to 'src/Compositor.cpp')
| -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; } |
