From 43aea417b0ed46e9ab634f32c0cc8b47c94e64ee Mon Sep 17 00:00:00 2001 From: vaxerski Date: Thu, 18 Aug 2022 22:35:55 +0200 Subject: Fix occasional hangups on exit --- src/Compositor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 5d6d65ec..bf549695 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -233,6 +233,14 @@ void CCompositor::cleanup() { wl_display_terminate(m_sWLDisplay); m_sWLDisplay = nullptr; + + // kill the PID with a sigkill after 2 seconds + const auto PID = getpid(); + + std::string call = "sleep 2 && kill -9 " + std::to_string(PID); + + execl("/bin/sh", "/bin/sh", "-c", call.c_str(), ">", "/dev/null", nullptr); // this is to prevent that random "freezing" + // the PID should not be reused. } void CCompositor::startCompositor() { -- cgit v1.2.3 From cc3f0ff9e7906bff60a041fc5556e7c5cbd71df5 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 20 Aug 2022 20:06:24 +0200 Subject: update wlroots dep --- src/Compositor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index bf549695..088440f1 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -718,7 +718,7 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) { .old_surface = m_pLastFocus, .new_surface = pSurface, }; - wlr_signal_emit_safe(&m_sSeat.seat->keyboard_state.events.focus_change, &event); + wl_signal_emit_mutable(&m_sSeat.seat->keyboard_state.events.focus_change, &event); if (pWindowOwner) Debug::log(LOG, "Set keyboard focus to surface %x, with window name: %s", pSurface, pWindowOwner->m_szTitle.c_str()); -- cgit v1.2.3