aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/events/Monitors.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/events/Monitors.cpp')
-rw-r--r--src/events/Monitors.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp
index 840d9cae..271b7d81 100644
--- a/src/events/Monitors.cpp
+++ b/src/events/Monitors.cpp
@@ -197,6 +197,8 @@ void Events::listener_monitorFrame(void* owner, void* data) {
return;
}
+ PMONITOR->renderingActive = true;
+
// we need to cleanup fading out when rendering the appropriate context
g_pCompositor->cleanupFadingOut(PMONITOR->ID);
@@ -207,6 +209,8 @@ void Events::listener_monitorFrame(void* owner, void* data) {
if (*PDAMAGEBLINK || *PVFR == 0)
g_pCompositor->scheduleFrameForMonitor(PMONITOR);
+ PMONITOR->renderingActive = false;
+
return;
}
@@ -309,12 +313,16 @@ void Events::listener_monitorFrame(void* owner, void* data) {
pixman_region32_fini(&frameDamage);
pixman_region32_fini(&damage);
+ PMONITOR->renderingActive = false;
+
if (!wlr_output_commit(PMONITOR->output))
return;
- if (*PDAMAGEBLINK || *PVFR == 0)
+ if (*PDAMAGEBLINK || *PVFR == 0 || PMONITOR->pendingFrame)
g_pCompositor->scheduleFrameForMonitor(PMONITOR);
+ PMONITOR->pendingFrame = false;
+
if (*PDEBUGOVERLAY == 1) {
const float µs = std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::high_resolution_clock::now() - startRender).count() / 1000.f;
g_pDebugOverlay->renderData(PMONITOR, µs);