mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 05:49:48 +01:00
Merge pull request #684 from tomahk/main
fix some bugs with attaching/disabling monitors
This commit is contained in:
commit
a8943246a7
2 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -356,4 +358,4 @@ void CMonitor::setMirror(const std::string& mirrorOf) {
|
||||||
|
|
||||||
g_pCompositor->m_pLastMonitor = g_pCompositor->m_vMonitors.front().get();
|
g_pCompositor->m_pLastMonitor = g_pCompositor->m_vMonitors.front().get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue