• 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
..
Makefile.in Loading commit data...
bitblt.c Loading commit data...
brush.c Loading commit data...
clipboard.c Loading commit data...
desktop.c Loading commit data...
display.c Loading commit data...
dllmain.c Loading commit data...
event.c Loading commit data...
graphics.c Loading commit data...
init.c Loading commit data...
keyboard.c Loading commit data...
mouse.c Loading commit data...
mwm.h Loading commit data...
opengl.c Loading commit data...
palette.c Loading commit data...
pen.c Loading commit data...
systray.c Loading commit data...
unixlib.h Loading commit data...
version.rc Loading commit data...
vulkan.c Loading commit data...
window.c Loading commit data...
winex11.drv.spec Loading commit data...
wintab.c Loading commit data...
x11drv.h Loading commit data...
x11drv_dll.h Loading commit data...
x11drv_main.c Loading commit data...
xcomposite.h Loading commit data...
xdnd.c Loading commit data...
xim.c Loading commit data...
xinerama.c Loading commit data...
xrandr.c Loading commit data...
xrender.c Loading commit data...
xvidmode.c Loading commit data...