From 4b25fbe5fda3bf7f0e561f400fb8f300b002eab3 Mon Sep 17 00:00:00 2001 From: nyx Date: Tue, 11 Mar 2025 13:32:01 -0400 Subject: [PATCH] windows: respect noinitialfocus with workspace changes (#9586) If a window is specifically placed on another workspace then we should not "focus" that workspace even if the window itself never gets focused when noinitialfocus is enabled for the window. --- src/events/Windows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 86e13d8e..b5273187 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -349,7 +349,7 @@ void Events::listener_mapWindow(void* owner, void* data) { if (!workspaceSilent) { if (pWorkspace->m_bIsSpecialWorkspace) pWorkspace->m_pMonitor->setSpecialWorkspace(pWorkspace); - else if (PMONITOR->activeWorkspaceID() != REQUESTEDWORKSPACEID) + else if (PMONITOR->activeWorkspaceID() != REQUESTEDWORKSPACEID && !PWINDOW->m_bNoInitialFocus) g_pKeybindManager->m_mDispatchers["workspace"](requestedWorkspaceName); PMONITOR = g_pCompositor->m_pLastMonitor.lock();