summaryrefslogtreecommitdiffstats
path: root/video/out/wayland_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/wayland_common.c')
-rw-r--r--video/out/wayland_common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 993c7b0e54..99aa8ee018 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -1607,9 +1607,10 @@ void wayland_sync_swap(struct vo_wayland_state *wl)
wl->last_skipped_vsyncs = 0;
- // If the presentation event was discarded, update the values based on
- // the difference in mp_time.
- if (wl->presentation_discarded) {
+ // If these are the same, presentation feedback has not been received.
+ // This will happen if the window is obscured/hidden in some way. Update
+ // the values based on the difference in mp_time.
+ if (wl->sync[index].ust == wl->last_ust && wl->last_ust) {
wl->sync[index].ust += mp_time - wl->sync[index].last_mp_time;
wl->sync[index].msc += 1;
wl->sync[index].sbc += 1;