1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
From: =?utf-8?q?Jonas_=C3=85dahl?= <jadahl@gmail.com>
Date: Thu, 11 Sep 2025 10:56:06 +0200
Subject: wayland/surface: Make state-applied logs more informative
Include the new surface size, i.e. log about applying a bit later, after
any buffer or viewport state has been applied.
Bug: https://gitlab.gnome.org/GNOME/mutter/-/issues/4310
Forwarded: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4648
---
src/wayland/meta-wayland-surface.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 450a91d..92ccebf 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -790,16 +790,6 @@ meta_wayland_surface_apply_state (MetaWaylandSurface *surface,
gboolean had_damage = FALSE;
int old_width, old_height;
- if (surface->resource)
- {
- meta_topic (META_DEBUG_WAYLAND, "Applying wl_surface#%u state",
- wl_resource_get_id (surface->resource));
- }
- else
- {
- meta_topic (META_DEBUG_WAYLAND, "Applying state of orphaned surface");
- }
-
old_width = meta_wayland_surface_get_width (surface);
old_height = meta_wayland_surface_get_height (surface);
@@ -902,6 +892,20 @@ meta_wayland_surface_apply_state (MetaWaylandSurface *surface,
surface->applied_state.scale = state->scale;
}
+ if (surface->resource)
+ {
+ meta_topic (META_DEBUG_WAYLAND,
+ "Applying wl_surface#%u state, size=%dx%d, type=%s",
+ wl_resource_get_id (surface->resource),
+ meta_wayland_surface_get_width (surface),
+ meta_wayland_surface_get_height (surface),
+ g_type_name_from_instance ((GTypeInstance *) surface->role));
+ }
+ else
+ {
+ meta_topic (META_DEBUG_WAYLAND, "Applying state of orphaned surface");
+ }
+
state->derived.surface_size_changed =
meta_wayland_surface_get_width (surface) != old_width ||
meta_wayland_surface_get_height (surface) != old_height;
|