summaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-12-21 13:41:34 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-01-18 14:34:21 +0200
commit0bbe624bfb8a999151b02956985aaa37b3cf5817 (patch)
tree8014318d79c76bc022e6c610628488c1b925db35 /xwayland
parent9f5a1031887824a16ed6428a22536c3c0e7b1e2e (diff)
downloadweston-0bbe624bfb8a999151b02956985aaa37b3cf5817.tar.gz
xwm: explain the read_properties() in xserver_map_shell_surface()
To me it was not obvious that this call is necessary, so provide some rationale. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/window-manager.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 37c8603f..d40d56ea 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -2659,6 +2659,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