|
|
776610 |
From 082efaca968aeefd4528ac6c8e28bf15e2f86ee5 Mon Sep 17 00:00:00 2001
|
|
|
776610 |
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
|
|
|
776610 |
Date: Mon, 27 Aug 2018 12:36:51 +0200
|
|
|
776610 |
Subject: [PATCH 6/8] wayland/legacy-xdg-shell: Cache frame callbacks if
|
|
|
776610 |
toplevel is unmanaged
|
|
|
776610 |
|
|
|
776610 |
A toplevel window can be unmanaged without the client knowing it (e.g. a
|
|
|
776610 |
modal dialog being unmapped together with its parent. When this has
|
|
|
776610 |
happened, take frame callbacks queued on a commit and cache them on the
|
|
|
776610 |
generic surface queue. If the toplevel is to be remapped because the
|
|
|
776610 |
surface was reassigned the toplevel role, the cached frame callbacks
|
|
|
776610 |
will be queued on the surface actor and dispatched accordingly.
|
|
|
776610 |
|
|
|
776610 |
https://gitlab.gnome.org/GNOME/mutter/issues/240
|
|
|
776610 |
(cherry picked from commit a740f50cd7d05582a251c23a7025999e55e4aba1)
|
|
|
776610 |
---
|
|
|
776610 |
src/wayland/meta-wayland-legacy-xdg-shell.c | 9 ++++++++-
|
|
|
776610 |
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
776610 |
|
|
|
776610 |
diff --git a/src/wayland/meta-wayland-legacy-xdg-shell.c b/src/wayland/meta-wayland-legacy-xdg-shell.c
|
|
|
776610 |
index e871be972..861270193 100644
|
|
|
776610 |
--- a/src/wayland/meta-wayland-legacy-xdg-shell.c
|
|
|
776610 |
+++ b/src/wayland/meta-wayland-legacy-xdg-shell.c
|
|
|
776610 |
@@ -598,11 +598,18 @@ meta_wayland_zxdg_toplevel_v6_commit (MetaWaylandSurfaceRole *surface_role,
|
|
|
776610 |
MetaWaylandSurfaceRoleClass *surface_role_class;
|
|
|
776610 |
MetaWaylandSurface *surface =
|
|
|
776610 |
meta_wayland_surface_role_get_surface (surface_role);
|
|
|
776610 |
- MetaWindow *window = surface->window;
|
|
|
776610 |
+ MetaWindow *window;
|
|
|
776610 |
MetaRectangle window_geometry;
|
|
|
776610 |
MetaRectangle old_geometry;
|
|
|
776610 |
gboolean geometry_changed;
|
|
|
776610 |
|
|
|
776610 |
+ window = surface->window;
|
|
|
776610 |
+ if (!window)
|
|
|
776610 |
+ {
|
|
|
776610 |
+ meta_wayland_surface_cache_pending_frame_callbacks (surface, pending);
|
|
|
776610 |
+ return;
|
|
|
776610 |
+ }
|
|
|
776610 |
+
|
|
|
776610 |
old_geometry = xdg_surface_priv->geometry;
|
|
|
776610 |
|
|
|
776610 |
surface_role_class =
|
|
|
776610 |
--
|
|
|
776610 |
2.19.0
|
|
|
776610 |
|