Support _NET_WM_FULLSCREEN_MONITORS for fullscreen windows spanning multiple monitors. This property
is used to hint window managers about which monitor a fullscreen window should cover. Window managers
make a fullscreen window spanning multiple monitors cover only one monitor when this property is missing.
Fix Project Cars 2/3 incorrect game window size when the triple-screen mode is on.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1233
The `_STRUCT_X86_THREAD_FULL_STATE64` definition comes from `/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/mach/i386/_structs.h` . It does not contain `_STRUCT_MCONTEXT64_FULL` or `_STRUCT_MCONTEXT_AVX64_FULL`.
There is a usr/include/i386/_mcontext.h file in 10.14.sdk, but it doesn't contain any of these definitions, unlike its cousins in later SDK versions.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1219#note_12915
bshanks was wondering about some details. While the fix seems sensible, it shouldn't be necessary according to him.
I had a closer look, and indeed Xcode 11.3.1 is not the problem. The command line tools for Xcode 11.3.1 are. Having them installed, even without pointing xcode-select, DEVELOPER_DIR or SDKROOT to them does some magic, for good (32 bit programs compile) and bad (the bug fixed here).
Some possibly relevant info:
```
grey:ntdll stefan$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
grey:ntdll stefan$ sudo xcode-select -p
/Applications/Xcode.app/Contents/Developer
grey:ntdll stefan$ echo $DEVELOPER_DIR
grey:ntdll stefan$ echo $SDKROOT
```
(Homebrew choked on a difference between xcode-select -p and sudo xcode-select -p once. I have no idea how that can happen, since xcode-select -s is system wide. Oh well)
wine configure command line:
`~/src/wine/configure --enable-win64 --without-x LDFLAGS="-L/Users/stefan/src/MoltenVK/Package/Latest/MoltenVK/dylib/macOS"`
And the exact build failure:
```
gcc -m64 -c -o dlls/ntdll/unix/signal_x86_64.o /Users/stefan/src/wine/dlls/ntdll/unix/signal_x86_64.c -Idlls/ntdll \
-I/Users/stefan/src/wine/dlls/ntdll -Iinclude -I/Users/stefan/src/wine/include -D__WINESRC__ \
-DWINE_NO_LONG_TYPES -D_NTSYSTEM_ -D_ACRTIMP= -DWINBASEAPI= -D_MSVCR_VER=0 -DWINE_UNIX_LIB -Wall \
-pipe -fcf-protection=none -fno-stack-protector -fno-strict-aliasing -Wdeclaration-after-statement \
-Wempty-body -Wignored-qualifiers -Winit-self -Wno-pragma-pack -Wstrict-prototypes -Wtype-limits \
-Wvla -Wwrite-strings -Wpointer-arith -gdwarf-4 -fPIC -fasynchronous-unwind-tables -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
In file included from /Users/stefan/src/wine/dlls/ntdll/unix/signal_x86_64.c:83:
/Users/stefan/src/wine/dlls/ntdll/unix/dwarf.h:913:45: warning: taking the absolute value of unsigned type 'ULONG_PTR'
(aka 'unsigned long') has no effect [-Wabsolute-value]
case DW_OP_abs: stack[sp] = labs(stack[sp]); break;
^
/Users/stefan/src/wine/dlls/ntdll/unix/dwarf.h:913:45: note: remove the call to 'labs' since unsigned values cannot be negative
case DW_OP_abs: stack[sp] = labs(stack[sp]); break;
^~~~
/Users/stefan/src/wine/dlls/ntdll/unix/signal_x86_64.c:282:38: error: use of undeclared identifier '_STRUCT_MCONTEXT64_FULL'
if (context->uc_mcsize == sizeof(_STRUCT_MCONTEXT64_FULL) ||
^
/Users/stefan/src/wine/dlls/ntdll/unix/signal_x86_64.c:283:38: error: use of undeclared identifier '_STRUCT_MCONTEXT_AVX64_FULL'
context->uc_mcsize == sizeof(_STRUCT_MCONTEXT_AVX64_FULL) ||
^
/Users/stefan/src/wine/dlls/ntdll/unix/signal_x86_64.c:286:63: error: expected expression
return (XMM_SAVE_AREA32 *)&((_STRUCT_MCONTEXT64_FULL *)context->uc_mcontext)->__fs.__fpu_fcw;
^
/Users/stefan/src/wine/dlls/ntdll/unix/signal_x86_64.c:286:38: error: use of undeclared identifier '_STRUCT_MCONTEXT64_FULL'
return (XMM_SAVE_AREA32 *)&((_STRUCT_MCONTEXT64_FULL *)context->uc_mcontext)->__fs.__fpu_fcw;
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1219#note_12913
Some fonts can end up with too low height for some sizes, resulting in ppem == 0, which can lead to some metrics becoming 0 too, especially tmHeight and tmAveCharWidth. This behavior is also observed on Windows, but on Linux it could lead to division by zero. This was noticed with the font `Emmentaler-Brace`, which comes with TexLive and GNU LilyPond, in the comctl32 status test.
This patch set also tries to make the Wine behavior closer to the Windows one by enabling tmAveCharWidth to be 0 and preventing it and tmHeight from causing divisions by zero. This is very much an edge case, and I don't know if it has caused problems in actual programs, so I don't know if it would be worth it to make the behavior match exactly. But this way at least the tests should pass if some incomplete/misconfigured fonts are installed.
I mainly limited myself to win32u. I'm not sure if these changes could affect behavior in other parts of the codebase, but the tests seems unchanged.
--
v4: win32u: Allow tmAveCharWidth to be 0 when tmHeight == 0.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1192
--
v2: vkd3d-shader/hlsl: Write SM4 dcl_thread_group instructions.
vkd3d-shader/hlsl: Parse the numthreads attribute.
vkd3d-shader/hlsl: Parse function attributes.
vkd3d-shader/hlsl: Use hlsl_new_synthetic_var() in hlsl_new_func_decl().
vkd3d-shader/hlsl: Add a hlsl_fixme() for compute shader thread counts.
tests: Add some tests for HLSL attribute syntax.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/43
Some fonts can end up with too low height for some sizes, resulting in ppem == 0, which can lead to some metrics becoming 0 too, especially tmHeight and tmAveCharWidth. This behavior is also observed on Windows, but on Linux it could lead to division by zero. This was noticed with the font `Emmentaler-Brace`, which comes with TexLive and GNU LilyPond, in the comctl32 status test.
This patch set also tries to make the Wine behavior closer to the Windows one by enabling tmAveCharWidth to be 0 and preventing it and tmHeight from causing divisions by zero. This is very much an edge case, and I don't know if it has caused problems in actual programs, so I don't know if it would be worth it to make the behavior match exactly. But this way at least the tests should pass if some incomplete/misconfigured fonts are installed.
I mainly limited myself to win32u. I'm not sure if these changes could affect behavior in other parts of the codebase, but the tests seems unchanged.
--
v3: win32u: Allow tmAveCharWidth to be 0.
win32u: Prevent division by 0 in get_transform_matrices().
win32u: check if tmAveCharWidth is 0 before division.
win32u: Do not use SCALE_NTM if TM.tmHeight == 0.
win32u: Warn when ppem == 0.
win32u: Prevent division by zero in scale_font_metrics().
https://gitlab.winehq.org/wine/wine/-/merge_requests/1192