From 2edf468aeb7d4703aa211cea3b58f04cbc73298c Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Sat, 9 Oct 2021 00:22:42 +0300 Subject: [PATCH] presentation-time: don't send presented on discard --- types/wlr_presentation_time.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/types/wlr_presentation_time.c b/types/wlr_presentation_time.c index 8acdcf1c8..4e3c4919b 100644 --- a/types/wlr_presentation_time.c +++ b/types/wlr_presentation_time.c @@ -289,9 +289,11 @@ static void feedback_handle_output_present(struct wl_listener *listener, return; } - struct wlr_presentation_event event = {0}; - wlr_presentation_event_from_output(&event, output_event); - wlr_presentation_feedback_send_presented(feedback, &event); + if (output_event->presented) { + struct wlr_presentation_event event = {0}; + wlr_presentation_event_from_output(&event, output_event); + wlr_presentation_feedback_send_presented(feedback, &event); + } wlr_presentation_feedback_destroy(feedback); }