From 7a7e3ee6d9367761eb225c44edf110800e4afafc Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 12 Jul 2023 00:30:42 +0200 Subject: [PATCH] screencopy: don't send frames on commits w/o a buffer --- src/events/Monitors.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index 73f5a6f6..15ebf287 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -217,7 +217,8 @@ void Events::listener_monitorCommit(void* owner, void* data) { const auto E = (wlr_output_event_commit*)data; - g_pProtocolManager->m_pScreencopyProtocolManager->onOutputCommit(PMONITOR, E); + if (E->committed & WLR_OUTPUT_STATE_BUFFER) + g_pProtocolManager->m_pScreencopyProtocolManager->onOutputCommit(PMONITOR, E); if (E->committed & (WLR_OUTPUT_STATE_SCALE | WLR_OUTPUT_STATE_TRANSFORM | WLR_OUTPUT_STATE_MODE)) g_pXWaylandManager->updateXWaylandScale();