kathenas / rpms / mutter

Forked from rpms/mutter 5 years ago
Clone

Blame SOURCES/0003-wayland-xdg-shell-Cache-pending-frame-callbacks-on-p.patch

776610
From 0a85e6272e7d04edc6c754affeea8d66716cc9fb Mon Sep 17 00:00:00 2001
776610
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
776610
Date: Wed, 25 Jul 2018 11:53:17 +0200
776610
Subject: [PATCH 3/8] wayland/xdg-shell: Cache pending frame callbacks on popup
776610
 reset
776610
776610
A popup can be reset, and when that happens, window and actor are
776610
destroyed, and won't be created again unless it is reassigned the
776610
popup role.
776610
776610
If a client queued frame callbacks when resetting a popup, the frame
776610
callbacks would be left in the pending state, as they were not queued on
776610
the actor, meaning we'd hit an assert about the frame callbacks not
776610
being handled. Fix this by caching them on the MetaWaylandSurface, so
776610
that they either are cleaned up on destruction, or queued on the actor
776610
would the surface be re-assigned the popup role.
776610
776610
https://gitlab.gnome.org/GNOME/mutter/issues/240
776610
(cherry picked from commit 407d62943c1c0bbb34df5943b6b2d91c5723b6c4)
776610
---
776610
 src/wayland/meta-wayland-xdg-shell.c | 1 +
776610
 1 file changed, 1 insertion(+)
776610
776610
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c
776610
index 4ab638f74..3cf6b5716 100644
776610
--- a/src/wayland/meta-wayland-xdg-shell.c
776610
+++ b/src/wayland/meta-wayland-xdg-shell.c
776610
@@ -962,6 +962,7 @@ meta_wayland_xdg_popup_commit (MetaWaylandSurfaceRole  *surface_role,
776610
   if (!surface->buffer_ref.buffer && xdg_surface_priv->first_buffer_attached)
776610
     {
776610
       meta_wayland_xdg_surface_reset (xdg_surface);
776610
+      meta_wayland_surface_cache_pending_frame_callbacks (surface, pending);
776610
       return;
776610
     }
776610
 
776610
-- 
776610
2.19.0
776610