aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Primak <vyivel@posteo.net>2021-10-09 00:22:42 +0300
committerSimon Ser <contact@emersion.fr>2021-10-15 09:38:58 +0200
commit2edf468aeb7d4703aa211cea3b58f04cbc73298c (patch)
tree75f8c1e1ad74d1316909a6dde6d2733ac3b5d62b
parent2af8cc769a4cb2e47d6ec75aa62bb8e565578a24 (diff)
presentation-time: don't send presented on discard
-rw-r--r--types/wlr_presentation_time.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/types/wlr_presentation_time.c b/types/wlr_presentation_time.c
index 8acdcf1c..4e3c4919 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);
}