[PATCH weston v2 22/24] xwm: explain the read_properties() in xserver_map_shell_surface()
Pekka Paalanen
ppaalanen at gmail.com
Wed Dec 21 14:40:20 UTC 2016
From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
To me it was not obvious that this call is necessary, so provide some
rationale.
Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
xwayland/window-manager.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 89b879d..38d530f 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -2657,6 +2657,15 @@ xserver_map_shell_surface(struct weston_wm_window *window,
wm->server->compositor->xwayland_interface;
struct weston_wm_window *parent;
+ /* This should be necessary only for override-redirected windows,
+ * because otherwise MapRequest handler would have already updated
+ * the properties. However, if X11 clients set properties after
+ * sending MapWindow, here we can still process them. The decorations
+ * have already been drawn once with the old property values, so if the
+ * app changes something affecting decor after MapWindow, we glitch.
+ * We only hit xserver_map_shell_surface() once per MapWindow and
+ * wl_surface, so better ensure we get the window type right.
+ */
weston_wm_window_read_properties(window);
/* A weston_wm_window may have many different surfaces assigned
--
2.10.2
More information about the wayland-devel
mailing list