mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 02:19:49 +01:00
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
This commit is contained in:
parent
d6890cb847
commit
edf5082a4c
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue