From 9acd41f28b0480d50195fecf90aa7bec0c532328 Mon Sep 17 00:00:00 2001
|
From: Jeffy Chen <jeffy.chen@rock-chips.com>
|
Date: Mon, 19 Oct 2020 18:13:23 +0800
|
Subject: [PATCH 32/74] HACK: xdg-shell: Don't abort when client size
|
mismatched
|
|
There's a race in qtwayland might causing size mismatch, let's
|
workaround it here for now.
|
|
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
|
---
|
libweston-desktop/xdg-shell.c | 38 +++++++++++------------------------
|
1 file changed, 12 insertions(+), 26 deletions(-)
|
|
diff --git a/libweston-desktop/xdg-shell.c b/libweston-desktop/xdg-shell.c
|
index a0161f6..f375e3a 100644
|
--- a/libweston-desktop/xdg-shell.c
|
+++ b/libweston-desktop/xdg-shell.c
|
@@ -706,37 +706,23 @@ weston_desktop_xdg_toplevel_committed(struct weston_desktop_xdg_toplevel *toplev
|
if (toplevel->next.state.maximized &&
|
(toplevel->next.size.width != geometry.width ||
|
toplevel->next.size.height != geometry.height)) {
|
- struct weston_desktop_client *client =
|
- weston_desktop_surface_get_client(toplevel->base.desktop_surface);
|
- struct wl_resource *client_resource =
|
- weston_desktop_client_get_resource(client);
|
-
|
- wl_resource_post_error(client_resource,
|
- XDG_WM_BASE_ERROR_INVALID_SURFACE_STATE,
|
- "xdg_surface geometry (%" PRIi32 " x %" PRIi32 ") "
|
- "does not match the configured maximized state (%" PRIi32 " x %" PRIi32 ")",
|
- geometry.width, geometry.height,
|
- toplevel->next.size.width,
|
- toplevel->next.size.height);
|
- return;
|
+ weston_desktop_xdg_surface_schedule_configure(&toplevel->base);
|
+ weston_log("xdg_surface buffer (%" PRIi32 " x %" PRIi32 ") "
|
+ "does not match the configured maximized state (%" PRIi32 " x %" PRIi32 ")",
|
+ geometry.width, geometry.height,
|
+ toplevel->next.size.width,
|
+ toplevel->next.size.height);
|
}
|
|
if (toplevel->next.state.fullscreen &&
|
(toplevel->next.size.width < geometry.width ||
|
toplevel->next.size.height < geometry.height)) {
|
- struct weston_desktop_client *client =
|
- weston_desktop_surface_get_client(toplevel->base.desktop_surface);
|
- struct wl_resource *client_resource =
|
- weston_desktop_client_get_resource(client);
|
-
|
- wl_resource_post_error(client_resource,
|
- XDG_WM_BASE_ERROR_INVALID_SURFACE_STATE,
|
- "xdg_surface geometry (%" PRIi32 " x %" PRIi32 ") "
|
- "is larger than the configured fullscreen state (%" PRIi32 " x %" PRIi32 ")",
|
- geometry.width, geometry.height,
|
- toplevel->next.size.width,
|
- toplevel->next.size.height);
|
- return;
|
+ weston_desktop_xdg_surface_schedule_configure(&toplevel->base);
|
+ weston_log("xdg_surface geometry (%" PRIi32 " x %" PRIi32 ") "
|
+ "is larger than the configured fullscreen state (%" PRIi32 " x %" PRIi32 ")",
|
+ geometry.width, geometry.height,
|
+ toplevel->next.size.width,
|
+ toplevel->next.size.height);
|
}
|
|
toplevel->current.state = toplevel->next.state;
|
--
|
2.20.1
|