From 24c0f83778f3db8476cd875580876d1d1a27a13a Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 20 Mar 2020 14:50:52 +0000 Subject: [PATCH] xdg-shell: More helpful surface-state-mismatch error When libweston-desktop kills an xdg-shell client because it has failed to configure its surface as demanded, be more helpful by explaining exactly what the error is. Signed-off-by: Daniel Stone --- libweston-desktop/xdg-shell.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libweston-desktop/xdg-shell.c b/libweston-desktop/xdg-shell.c index d1fc2ec12..34e7be921 100644 --- a/libweston-desktop/xdg-shell.c +++ b/libweston-desktop/xdg-shell.c @@ -683,7 +683,11 @@ weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplev wl_resource_post_error(client_resource, XDG_WM_BASE_ERROR_INVALID_SURFACE_STATE, - "xdg_surface buffer does not match the configured state"); + "xdg_surface buffer (%" PRIi32 " x %" PRIi32 ") " + "does not match the configured state (%" PRIi32 " x %" PRIi32 ")", + geometry.width, geometry.height, + toplevel->next.size.width, + toplevel->next.size.height); return; }