diff options
author | Michel Dänzer <mdaenzer@redhat.com> | 2022-06-15 15:54:29 +0200 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2022-07-01 10:02:16 +0200 |
commit | 5c14db4b46bb8c7959ff8f5f1505a56e49a1ee98 (patch) | |
tree | 74584756cd1371d27e7530ea79bc9f02de0ff07f | |
parent | 8c0fe08c6b13c30dd3332323f427272626e5ff1e (diff) |
xwayland/present: Do not send two idle notify events for flip pixmaps
Could happen if the buffer release event was already processed before
xwl_present_flips_stop.
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1351
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit b9b33d88ede76f0eec5055320e1cb27b37bade15)
-rw-r--r-- | hw/xwayland/xwayland-present.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c index ce74482ef..99e476b2f 100644 --- a/hw/xwayland/xwayland-present.c +++ b/hw/xwayland/xwayland-present.c @@ -276,7 +276,15 @@ xwl_present_flips_stop(WindowPtr window) xwl_present_free_idle_vblank(vblank); if (xwl_present_window->flip_active) { - xwl_present_free_idle_vblank(xwl_present_window->flip_active); + struct xwl_present_event *event; + + vblank = xwl_present_window->flip_active; + event = xwl_present_event_from_id((uintptr_t)vblank); + if (event->pixmap) + xwl_present_free_idle_vblank(vblank); + else + xwl_present_free_event(event); + xwl_present_window->flip_active = NULL; } |