diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-21 17:00:17 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-21 17:00:17 +0100 |
| commit | 51ce922ae1dac73181957bb0082a61d7467c19ba (patch) | |
| tree | 5a7fa4e848a55512a79b63e23b37ffa6322f798f /src/events/Windows.cpp | |
| parent | 21418f97ff31d68276b1b2b228d5b1fea26cf01d (diff) | |
properly calc layers
Diffstat (limited to 'src/events/Windows.cpp')
| -rw-r--r-- | src/events/Windows.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index af468bd8..1a21b499 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -23,7 +23,14 @@ void Events::listener_mapWindow(wl_listener* listener, void* data) { PWINDOW->m_bMappedX11 = true; PWINDOW->m_iWorkspaceID = PMONITOR->activeWorkspace; - wl_signal_add(&g_pXWaylandManager->getWindowSurface(PWINDOW)->events.new_subsurface, &PWINDOW->listen_newSubsurfaceWindow); + const auto PWINDOWSURFACE = g_pXWaylandManager->getWindowSurface(PWINDOW); + + if (!PWINDOWSURFACE) { + g_pCompositor->m_lWindows.remove(*PWINDOW); + return; + } + + wl_signal_add(&PWINDOWSURFACE->events.new_subsurface, &PWINDOW->listen_newSubsurfaceWindow); if (g_pXWaylandManager->shouldBeFloated(PWINDOW)) g_pLayoutManager->getCurrentLayout()->onWindowCreatedFloating(PWINDOW); |
