fixed session-less envs

This commit is contained in:
vaxerski
2022-07-13 18:31:09 +02:00
parent 6708f3b133
commit 49dbb586e3
2 changed files with 4 additions and 3 deletions

View File

@@ -190,7 +190,8 @@ void CCompositor::initAllSignals() {
addWLSignal(&m_sWLRVirtPtrMgr->events.new_virtual_pointer, &Events::listen_newVirtPtr, m_sWLRVirtPtrMgr, "VirtPtrMgr");
addWLSignal(&m_sWLRRenderer->events.destroy, &Events::listen_RendererDestroy, m_sWLRRenderer, "WLRRenderer");
addWLSignal(&m_sWLRIdleInhibitMgr->events.new_inhibitor, &Events::listen_newIdleInhibitor, m_sWLRIdleInhibitMgr, "WLRIdleInhibitMgr");
addWLSignal(&m_sWLRSession->events.active, &Events::listen_sessionActive, m_sWLRSession, "Session");
if (m_sWLRSession)
addWLSignal(&m_sWLRSession->events.active, &Events::listen_sessionActive, m_sWLRSession, "Session");
}
void CCompositor::cleanup() {
@@ -1346,7 +1347,7 @@ void CCompositor::updateWorkspaceWindowDecos(const int& id) {
}
void CCompositor::scheduleFrameForMonitor(SMonitor* pMonitor) {
if (!m_sWLRSession->active || !m_bSessionActive)
if ((m_sWLRSession && !m_sWLRSession->active) || !m_bSessionActive)
return;
wlr_output_schedule_frame(pMonitor->output);