• Zhiyi Zhang's avatar
    winex11.drv: Move the dummy parent window to (0, 0). · 35193586
    Zhiyi Zhang authored
    Move the dummy parent window from (-1, -1) to (0, 0) so that the window is considered visible by
    Wayland. The X11 window region is set to an empty rectangle so that the window is still in fact
    invisible. If Xshape support is not compiled in, then fall back to using (-1, -1).
    
    This fixes poor performance when running Office 2016 on Xwayland. It's caused by glXWaitForSbcOML()
    in glxdrv_wglSwapBuffers() taking 1 second every time it gets called. The timeout is from
    TIMER_LEN_FLIP (1000ms) in xwl_present_reset_timer() in the xserver source code hw/xwayland/xwayland-present.c.
    Xwayland doesn't actually know when a frame is visible on screen[1][2]. It relies on a timer to
    simulate the process and when the window is invisible it uses a timer with a 1000ms timeout. This
    patch makes the dummy parent window visible so that Xwayland will use the timer with a 17ms timeout(~60fps),
    which also means that there will still be a 60fps limit for some windows when running on Xwayland.
    
    [1]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/971
    [2]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/973
    35193586
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...