xwayland: Create an xwl window for toplevel only

Olivier Fourdan requested to merge ofourdan/xserver:issue1099 into master

The present support in Xwayland assumes the xwl_window is the same for all the child windows of the toplevel.

When mapping a new X11 window, ensure_surface_for_window() checks for an existing xwl_window by using xwl_window_get() which will just check for the registered xwl_window for the window.

That means that a client mapping a child window of an existing window with a xwl_window will get another different xwl_window.

One ill effect of this is that Present will fail to match the frame callback for that window, causing a 1 fps repaint of the window as with some wine apps (e.g. https://bugs.winehq.org/show_bug.cgi?id=47066).

Fix ensure_surface_for_window() by using xwl_window_get_from_window() which will walk the window tree, so that a child window won't get another xwl_window than its parent.

#1099 (closed)

Edited by Olivier Fourdan

Merge request reports