[mutter/wip/texture-purge-on-nvidia: 37/66] wayland/legacy-xdg-shell: Cache frame callbacks if toplevel is unmanaged
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/texture-purge-on-nvidia: 37/66] wayland/legacy-xdg-shell: Cache frame callbacks if toplevel is unmanaged
- Date: Tue, 8 Jan 2019 22:01:31 +0000 (UTC)
commit 66b1e1123ea6246460d219378d479539d45a9852
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Mon Aug 27 12:36:51 2018 +0200
wayland/legacy-xdg-shell: Cache frame callbacks if toplevel is unmanaged
A toplevel window can be unmanaged without the client knowing it (e.g. a
modal dialog being unmapped together with its parent. When this has
happened, take frame callbacks queued on a commit and cache them on the
generic surface queue. If the toplevel is to be remapped because the
surface was reassigned the toplevel role, the cached frame callbacks
will be queued on the surface actor and dispatched accordingly.
https://gitlab.gnome.org/GNOME/mutter/issues/240
(cherry picked from commit a740f50cd7d05582a251c23a7025999e55e4aba1)
src/wayland/meta-wayland-legacy-xdg-shell.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-wayland-legacy-xdg-shell.c b/src/wayland/meta-wayland-legacy-xdg-shell.c
index e871be972..861270193 100644
--- a/src/wayland/meta-wayland-legacy-xdg-shell.c
+++ b/src/wayland/meta-wayland-legacy-xdg-shell.c
@@ -598,11 +598,18 @@ meta_wayland_zxdg_toplevel_v6_commit (MetaWaylandSurfaceRole *surface_role,
MetaWaylandSurfaceRoleClass *surface_role_class;
MetaWaylandSurface *surface =
meta_wayland_surface_role_get_surface (surface_role);
- MetaWindow *window = surface->window;
+ MetaWindow *window;
MetaRectangle window_geometry;
MetaRectangle old_geometry;
gboolean geometry_changed;
+ window = surface->window;
+ if (!window)
+ {
+ meta_wayland_surface_cache_pending_frame_callbacks (surface, pending);
+ return;
+ }
+
old_geometry = xdg_surface_priv->geometry;
surface_role_class =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]