From 5ffb1032e171b88dc45e0169159e449989a0fc58 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 2 Oct 2023 14:09:23 +0100 Subject: [PATCH] events: don't focus new window if spawned behind fullscreen fixes #3473 --- src/events/Windows.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index f726b224..88ccab22 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -467,6 +467,8 @@ void Events::listener_mapWindow(void* owner, void* data) { const auto PLSFROMFOCUS = g_pCompositor->getLayerSurfaceFromSurface(g_pCompositor->m_pLastFocus); if (PLSFROMFOCUS && PLSFROMFOCUS->layerSurface->current.keyboard_interactive) PWINDOW->m_bNoInitialFocus = true; + if (PWORKSPACE->m_bHasFullscreenWindow && !requestsFullscreen) + PWINDOW->m_bNoInitialFocus = true; if (!PWINDOW->m_bNoFocus && !PWINDOW->m_bNoInitialFocus && (PWINDOW->m_iX11Type != 2 || (PWINDOW->m_bIsX11 && wlr_xwayland_or_surface_wants_focus(PWINDOW->m_uSurface.xwayland))) && !workspaceSilent &&