xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 9 09:27:37 UTC 2020


 hw/xwayland/xwayland-window.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 606ba7fc51e5420646f75c4e672fbe61eb7c7e6e
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Thu Nov 5 18:35:54 2020 +0100

    xwayland: Create an xwl_window for toplevel only
    
    One general assumption in Xwayland is that the xwl_window remains the
    same for all the child windows of the toplevel window.
    
    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.
    
    If an X11 client issues a Present request on the parent window, hence
    placed underneath its child window of the same size, the Wayland
    compositor may not send the frame callback event for the parent's
    Wayland surface which is reckoned to be not visible, obscured behind
    the other Wayland surface for the child X11 window.
    
    That bug affects some games running in wine which may get 1 fps because
    the repaint occurs only on timeout with a long interval (as with, e.g.
    https://bugs.winehq.org/show_bug.cgi?id=47066)
    
    Fix ensure_surface_for_window() by using xwl_window_from_window() which
    will walk the window tree, so that a child window won't get another
    xwl_window than its parent.
    
    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1099
    See-also: https://bugs.winehq.org/show_bug.cgi?id=47066
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>

diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c
index 23d2b3086..d03790633 100644
--- a/hw/xwayland/xwayland-window.c
+++ b/hw/xwayland/xwayland-window.c
@@ -422,7 +422,7 @@ ensure_surface_for_window(WindowPtr window)
     struct wl_region *region;
     WindowPtr toplevel;
 
-    if (xwl_window_get(window))
+    if (xwl_window_from_window(window))
         return TRUE;
 
     xwl_screen = xwl_screen_get(screen);


More information about the xorg-commit mailing list