diff options
author | Simon Ser <contact@emersion.fr> | 2021-01-10 17:00:09 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-01-10 17:02:25 +0100 |
commit | edf5082a4cb41a9e9f1146835f84020c283cdd09 (patch) | |
tree | 60c690f515bc48e80a56c15b12397b7e0e5942d8 | |
parent | d6890cb847de6adb95f9579937a9cce049f076b8 (diff) |
output-damage: use output commit event
Instead of relying on output.pending.committed, use
wlr_output_event_commit to find out whether a buffer was committed.
Eventually output.pending will be cleared before the commit event is
emitted.
References: https://github.com/swaywm/wlroots/issues/2098
-rw-r--r-- | types/wlr_output_damage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/types/wlr_output_damage.c b/types/wlr_output_damage.c index ade0375e..35949412 100644 --- a/types/wlr_output_damage.c +++ b/types/wlr_output_damage.c @@ -59,8 +59,9 @@ static void output_handle_frame(struct wl_listener *listener, void *data) { static void output_handle_commit(struct wl_listener *listener, void *data) { struct wlr_output_damage *output_damage = wl_container_of(listener, output_damage, output_commit); + struct wlr_output_event_commit *event = data; - if (!(output_damage->output->pending.committed & WLR_OUTPUT_STATE_BUFFER)) { + if (!(event->committed & WLR_OUTPUT_STATE_BUFFER)) { return; } |