diff options
| author | Tom Benham <38216488+tomben13@users.noreply.github.com> | 2024-02-25 15:09:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-25 14:09:41 +0000 |
| commit | 54a8329936d31537411c7a1a4d1815820b98316a (patch) | |
| tree | 599cd0aa4d5c6c61c6094031f053e36492648aca /src/events/Windows.cpp | |
| parent | f9cfec8abb9033e14f558fc2dc24dfa1c2a51e5a (diff) | |
layout: Fixed ghost window when opened while fullscreen on a different workspace (#4822)
* Fixed ghost window when opened while fullscreen on a different workspace
* Format
---------
Co-authored-by: Tom Benham <tom.benham@quadrille.fr>
Diffstat (limited to 'src/events/Windows.cpp')
| -rw-r--r-- | src/events/Windows.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 0854f68e..81c5c800 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -49,8 +49,7 @@ void Events::listener_mapWindow(void* owner, void* data) { static auto* const PNEWTAKESOVERFS = (Hyprlang::INT* const*)g_pConfigManager->getConfigValuePtr("misc:new_window_takes_over_fullscreen"); auto PMONITOR = g_pCompositor->m_pLastMonitor; - const auto PWORKSPACE = - PMONITOR->specialWorkspaceID ? g_pCompositor->getWorkspaceByID(PMONITOR->specialWorkspaceID) : g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace); + auto PWORKSPACE = PMONITOR->specialWorkspaceID ? g_pCompositor->getWorkspaceByID(PMONITOR->specialWorkspaceID) : g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace); PWINDOW->m_iMonitorID = PMONITOR->ID; PWINDOW->m_iWorkspaceID = PMONITOR->specialWorkspaceID ? PMONITOR->specialWorkspaceID : PMONITOR->activeWorkspace; PWINDOW->m_bIsMapped = true; @@ -280,6 +279,8 @@ void Events::listener_mapWindow(void* owner, void* data) { if (!pWorkspace) pWorkspace = g_pCompositor->createNewWorkspace(REQUESTEDWORKSPACEID, PWINDOW->m_iMonitorID, requestedWorkspaceName); + PWORKSPACE = pWorkspace; + PWINDOW->m_iWorkspaceID = pWorkspace->m_iID; PWINDOW->m_iMonitorID = pWorkspace->m_iMonitorID; |
