more safety around shutting down and mouse movements

This commit is contained in:
vaxerski 2022-10-24 00:14:42 +01:00
parent 10303259f7
commit c6a3092b45
2 changed files with 3 additions and 3 deletions

View file

@ -241,6 +241,8 @@ void CCompositor::cleanup() {
if (!m_sWLDisplay || m_bIsShuttingDown)
return;
m_bIsShuttingDown = true;
m_pLastFocus = nullptr;
m_pLastWindow = nullptr;
@ -256,8 +258,6 @@ void CCompositor::cleanup() {
m_vWorkspaces.clear();
m_vWindows.clear();
m_bIsShuttingDown = true;
for (auto& m : m_vMonitors) {
g_pHyprOpenGL->destroyMonitorResources(m.get());

View file

@ -39,7 +39,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
m_pFoundLSToFocus = nullptr;
m_pFoundWindowToFocus = nullptr;
if (!g_pCompositor->m_bReadyToProcess)
if (!g_pCompositor->m_bReadyToProcess || g_pCompositor->m_bIsShuttingDown)
return;
if (!g_pCompositor->m_sSeat.mouse) {