Fixes the longstanding misbehavior of X window managers with respect to
Delphi based applications.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26503
--
v3: winex11: Fix X11 WM behavior for Delphi based apps.
Revert "winex11: add missing newline in TRACE."
winex11: add missing newline in TRACE.
winex11: Fix X11 WM behavior for Delphi based apps.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2229
I was mainly after the issue fixed by the second patch but stomped on another one while testing that and that one looks even more unfortunate to me.
1. When connect() is used on blocking socket and fails for whatever reason, next connect() will make a new independent connection attempt (both on Windows and Unix). In non-blocking mode however (and Unix sockets are always in non-blocking mode in Wine) on Linux the next connect() will always return an error (unlike Windows which will make a new connect attempt if the previous one completed and failed). So in Wine now even for blocking socket connect() will fail if previous attempt failed and return WSAECONNABORTED. The error returned by Linux connect() will be ECONNABORTED if getsockopt(SO_ERROR) was called on the socket after connect completed with failure, and true connect() fail error if getsockopt wasn't called.
2. connect() on blocking socket times out after ~21sec on Windows and after ~130 sec on Linux. That is the case when peer doesn't actively reject connection but just never replies anything. That is, client sent SYN and never heard back. So much longer timeout leads to what is seen as hang on exit in one game, but probably more important that it affect much more in various apps provoking timeouts or huge delays not just on exit.
I did not find a way to set connect() timeout for socket on Windows. That difference mostly corresponds to number of SYN send retries. That is 7 on Linux by default and 4 on Windows (the delay between attempts starts from 1s and is doubled on each next attempt). There is TCP_SYNCNT socket option (Linux specific now, unfortunately) which allows to set the number of retries. Setting that to 4 yields 32 sec timeout (vs 21 sec on Windows). The remaining difference is probably due to different amount of time waited after last SYN is sent. There is also TCP_USER_TIMEOUT parameter which allows to effectively set the delay exactly, but it might interfere with SO_KEEPALIVE somehow and I hope that 32 vs 21 is not that critical already as 130 vs 21 and probably we can avoid complicating the thing with it.
--
v3: server: Set TCP SYN count on sockets.
server: Retry socket connection on ECONNABORTED error.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2215
I was mainly after the issue fixed by the second patch but stomped on another one while testing that and that one looks even more unfortunate to me.
1. When connect() is used on blocking socket and fails for whatever reason, next connect() will make a new independent connection attempt (both on Windows and Unix). In non-blocking mode however (and Unix sockets are always in non-blocking mode in Wine) on Linux the next connect() will always return an error (unlike Windows which will make a new connect attempt if the previous one completed and failed). So in Wine now even for blocking socket connect() will fail if previous attempt failed and return WSAECONNABORTED. The error returned by Linux connect() will be ECONNABORTED if getsockopt(SO_ERROR) was called on the socket after connect completed with failure, and true connect() fail error if getsockopt wasn't called.
2. connect() on blocking socket times out after ~21sec on Windows and after ~130 sec on Linux. That is the case when peer doesn't actively reject connection but just never replies anything. That is, client sent SYN and never heard back. So much longer timeout leads to what is seen as hang on exit in one game, but probably more important that it affect much more in various apps provoking timeouts or huge delays not just on exit.
I did not find a way to set connect() timeout for socket on Windows. That difference mostly corresponds to number of SYN send retries. That is 7 on Linux by default and 4 on Windows (the delay between attempts starts from 1s and is doubled on each next attempt). There is TCP_SYNCNT socket option (Linux specific now, unfortunately) which allows to set the number of retries. Setting that to 4 yields 32 sec timeout (vs 21 sec on Windows). The remaining difference is probably due to different amount of time waited after last SYN is sent. There is also TCP_USER_TIMEOUT parameter which allows to effectively set the delay exactly, but it might interfere with SO_KEEPALIVE somehow and I hope that 32 vs 21 is not that critical already as 130 vs 21 and probably we can avoid complicating the thing with it.
--
v2: server: Set TCP SYN count on sockets.
server: Retry socket connection on ECONNABORTED error.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2215
Signed-off-by: Bernhard Kölbl <besentv(a)gmail.com>
--
v15: windows.media.speech: Implement Vosk create and release functions in the unixlib.
windows.media.speech/tests: Allow the SpeechRecognizer creation to fail in Wine.
windows.media.speech/tests: Get rid of duplicated hresult.
windows.media.speech: Add unixlib stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2091
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51848
SPORE creates a swapchain on a window, then destroys it, then creates a
different swapchain on the same window and uses it for the rest of its lifetime.
The swapchains have different GLX visuals (the details are unimportant).
The effect is that the second swapchain sees the pixel format set by the first
swapchain, through GetPixelFormat(), and therefore needs to set and then
restore the new pixel format on every present. This results in recreating the
GLX drawable twice per frame, which is extremely expensive.
This patch series changes WGL_WINE_pixel_format_passthrough to only set an
"internal" pixel format. The real pixel format will still be set as it is now,
but GetPixelFormat() will always return 0, signalling to wined3d that the
application has not set the pixel format, and therefore there is no need to
restore it.
As the tests show, this change also matches Windows, which does not report that
a pixel format has been set after presenting a Direct3D swapchain.
This is a large series by patch count, but I fear that splitting it into two
parts would make it difficult to grasp the entire picture, and purpose of the
earlier patches. It also contains six patches which are simply repetitions
across the three user drivers, which should ease the burden of review somewhat.
--
v2: wineandroid: Separately store the internal pixel format set by WGL_WINE_pixel_format_passthrough.
winemac: Separately store the internal pixel format set by WGL_WINE_pixel_format_passthrough.
winex11: Separately store the internal pixel format set by WGL_WINE_pixel_format_passthrough.
win32u: Allow separately storing the internal pixel format set by WGL_WINE_pixel_format_passthrough.
wined3d: Do not set the pixel format if wglGetPixelFormat() returns zero and we already set the internal pixel format.
winemac: Retrieve the pixel format from win32u for normal windows in wglGetPixelFormat().
wineandroid: Retrieve the pixel format from win32u for normal windows in wglGetPixelFormat().
winex11: Retrieve the pixel format from win32u for normal windows in wglGetPixelFormat().
win32u: Introduce a win32u_get_window_pixel_format() helper.
win32u: Make NtUserSetWindowPixelFormat() into a proper export.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2217