socket2: fixup invalid ws passed to openwindow

fixes #11044
This commit is contained in:
Vaxry
2025-07-16 18:22:54 +02:00
parent ccf5c7dcc7
commit f6ad0412d1

View File

@@ -418,8 +418,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
PWINDOW->m_swallowed->m_currentlySwallowed = true; PWINDOW->m_swallowed->m_currentlySwallowed = true;
// emit the IPC event before the layout might focus the window to avoid a focus event first // emit the IPC event before the layout might focus the window to avoid a focus event first
g_pEventManager->postEvent(SHyprIPCEvent{ g_pEventManager->postEvent(SHyprIPCEvent{"openwindow", std::format("{:x},{},{},{}", PWINDOW, PWORKSPACE->m_name, PWINDOW->m_class, PWINDOW->m_title)});
"openwindow", std::format("{:x},{},{},{}", PWINDOW, !requestedWorkspace.empty() ? requestedWorkspace : PWORKSPACE->m_name, PWINDOW->m_class, PWINDOW->m_title)});
if (PWINDOW->m_isFloating) { if (PWINDOW->m_isFloating) {
g_pLayoutManager->getCurrentLayout()->onWindowCreated(PWINDOW); g_pLayoutManager->getCurrentLayout()->onWindowCreated(PWINDOW);