Merge pull request #684 from tomahk/main

fix some bugs with attaching/disabling monitors
This commit is contained in:
Vaxry 2022-09-19 21:08:48 +01:00 committed by GitHub
commit a8943246a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -286,7 +286,8 @@ void Events::listener_monitorFrame(void* owner, void* data) {
pixman_region32_fini(&frameDamage); pixman_region32_fini(&frameDamage);
pixman_region32_fini(&damage); pixman_region32_fini(&damage);
wlr_output_commit(PMONITOR->output); if (!wlr_output_commit(PMONITOR->output))
return;
if (*PDAMAGEBLINK || *PNOVFR) if (*PDAMAGEBLINK || *PNOVFR)
g_pCompositor->scheduleFrameForMonitor(PMONITOR); g_pCompositor->scheduleFrameForMonitor(PMONITOR);

View file

@ -65,6 +65,8 @@ void CMonitor::onConnect(bool noRule) {
} }
if (!m_bRenderingInitPassed) { if (!m_bRenderingInitPassed) {
output->allocator = nullptr;
output->renderer = nullptr;
wlr_output_init_render(output, g_pCompositor->m_sWLRAllocator, g_pCompositor->m_sWLRRenderer); wlr_output_init_render(output, g_pCompositor->m_sWLRAllocator, g_pCompositor->m_sWLRRenderer);
m_bRenderingInitPassed = true; m_bRenderingInitPassed = true;
} }