diff options
| author | xDarksome <dev@darkso.me> | 2022-08-21 16:03:51 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-21 16:03:51 +0300 |
| commit | 0f25f3aee36c4f312a3fb36a7abb63fe78f5254e (patch) | |
| tree | 7fed1128dccc2de8eac672d4ca57eaaedd2af323 /src/Compositor.cpp | |
| parent | 776750ee3473fd0ca44969a9a1c79679e5805a0f (diff) | |
| parent | 5e1f2539cb24b10cad50eba4c3131190022d5ee0 (diff) | |
Merge branch 'hyprwm:main' into main
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index f345e300..3a73c1b4 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() { @@ -710,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()); |
