diff options
author | Kirill Primak <vyivel@posteo.net> | 2021-10-14 22:32:40 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-10-15 09:38:58 +0200 |
commit | 1089b7b8d638a286c70571fced969826d61143bc (patch) | |
tree | b53723aacfda81f42cee90393cf634e82d3a3e1d /backend | |
parent | 1b65a80e9d87a5107fadcced397ed231703d039e (diff) |
output: disallow NULL event for wlr_output_send_present()
Diffstat (limited to 'backend')
-rw-r--r-- | backend/headless/output.c | 5 | ||||
-rw-r--r-- | backend/wayland/output.c | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/backend/headless/output.c b/backend/headless/output.c index 8c7e57f1..8351c935 100644 --- a/backend/headless/output.c +++ b/backend/headless/output.c @@ -64,7 +64,10 @@ static bool output_commit(struct wlr_output *wlr_output) { } if (wlr_output->pending.committed & WLR_OUTPUT_STATE_BUFFER) { - wlr_output_send_present(wlr_output, NULL); + struct wlr_output_event_present present_event = { + .commit_seq = wlr_output->commit_seq + 1, + }; + wlr_output_send_present(wlr_output, &present_event); } return true; diff --git a/backend/wayland/output.c b/backend/wayland/output.c index 16eb17f5..285c70fc 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -89,7 +89,10 @@ static void presentation_feedback_handle_discarded(void *data, struct wp_presentation_feedback *wp_feedback) { struct wlr_wl_presentation_feedback *feedback = data; - wlr_output_send_present(&feedback->output->wlr_output, NULL); + struct wlr_output_event_present event = { + .commit_seq = feedback->commit_seq, + }; + wlr_output_send_present(&feedback->output->wlr_output, &event); presentation_feedback_destroy(feedback); } @@ -345,7 +348,10 @@ static bool output_commit(struct wlr_output *wlr_output) { wp_presentation_feedback_add_listener(wp_feedback, &presentation_feedback_listener, feedback); } else { - wlr_output_send_present(wlr_output, NULL); + struct wlr_output_event_present present_event = { + .commit_seq = wlr_output->commit_seq + 1, + }; + wlr_output_send_present(wlr_output, &present_event); } } |