From cd720eaf668d7b7e92dd9c8cdaeee5a851ade40f Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 21 Mar 2022 16:16:47 +0100 Subject: [PATCH] fix crash --- src/events/Windows.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index bf18fb20..af468bd8 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -23,6 +23,8 @@ 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); + if (g_pXWaylandManager->shouldBeFloated(PWINDOW)) g_pLayoutManager->getCurrentLayout()->onWindowCreatedFloating(PWINDOW); else @@ -121,7 +123,6 @@ void Events::listener_surfaceXWayland(wl_listener* listener, void* data) { wl_signal_add(&XWSURFACE->events.set_title, &PNEWWINDOW->listen_setTitleWindow); wl_signal_add(&XWSURFACE->events.destroy, &PNEWWINDOW->listen_destroyWindow); wl_signal_add(&XWSURFACE->events.request_fullscreen, &PNEWWINDOW->listen_fullscreenWindow); - wl_signal_add(&XWSURFACE->surface->events.new_subsurface, &PNEWWINDOW->listen_newSubsurfaceWindow); Debug::log(LOG, "New XWayland Surface created."); } @@ -143,7 +144,6 @@ void Events::listener_newXDGSurface(wl_listener* listener, void* data) { wl_signal_add(&XDGSURFACE->events.destroy, &PNEWWINDOW->listen_destroyWindow); wl_signal_add(&XDGSURFACE->toplevel->events.set_title, &PNEWWINDOW->listen_setTitleWindow); wl_signal_add(&XDGSURFACE->toplevel->events.request_fullscreen, &PNEWWINDOW->listen_fullscreenWindow); - wl_signal_add(&XDGSURFACE->surface->events.new_subsurface, &PNEWWINDOW->listen_newSubsurfaceWindow); Debug::log(LOG, "New XDG Surface created."); }