This MR improves driver support for scaled HiDPI displays, by respecting the application/window DPI.
Since we don't support per-monitor DPI information and awareness modes yet, the user should set the Wine system DPI to match the DPI/scale of the display the app will be running on, for best results.
Here is how things look with a few scenarios:
1. Screen scaled at 2x, application at 96dpi (e.g., dpi unaware apps) => the compositor automatically scales the surface:

2. Screen scaled at 2x, application at 192dpi (dpi matches compositor scale) => no compositor scaling:

3. Screen scaled at 1x, application at 96dpi (dpi matches compositor scale) => no compositor scaling:

4. Screen scaled at 1x, application at 192dpi, not typically used, just wanted to show what happens with such a mismatch:

Thanks!
--
v3: winewayland.drv: Ignore spurious size hints.
winewayland.drv: Present cursors with the correct scale.
winewayland.drv: Refactor cursor code to prepare for scaling support.
winewayland.drv: Present surfaces with the correct scale.
winewayland.drv: Prepare to handle different coordinate spaces.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4203
This fixes some inconsistency issues when it comes to inner vs outer windows. On second patch I keep ref again to outer windows from the inner windows, and there are several reasons for this:
* It fixes the existing tests to match native IE.
* It simplifies the code (it's always valid now, no second-guessing or what-ifs needed) and gets rid of `outer_window` in HTMLDocumentNode.
* It **fixes** the `outer_window` in HTMLDocumentNode → it was basically prone to crashes in niche cases since it didn't hold a ref before. We can't couple it to the inner `window` field either, because that one gets detached, and that will fail *existing* tests. For example: `events.c:3224: Test failed: put_URL failed: 80004005`.
* Instead of having to keep outer window refs in specific objects, it's simpler to have it consistent everywhere.
For now only the external caller changes are kept and a leak fix.
--
v3: mshtml: Don't NULL out the doc's window when unlinking the window.
mshtml: Return outer window to external callers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4312
_(w)environ[] do have a distinct allocation chunk for each entry, so
that _(w)environ[i] pointer and (pointed) string don't change when
updating/deleting any other entry.
Proposed implementation still differs from native:
- allocation is done on process heap, while native uses msvcrt's heap
- first ANSI allocated _environ[] doesn't have per entry allocation.
This is only activated after a change (update/deletion) to _environ[]
is made.
--
v6: msvcrt: Fix getmainargs() family to return correct environment block.
msvcrt: Use msvcrt heap for allocating envionment data.
msvcrt: Test adding UNICODE env variables.
msvcrt/tests: Add tests about intricating kernel32 and msvcrt env calls.
msvcrt/tests: Add tests about allocation of environment entries.
msvcrt: Improve environment tests (initial conditions).
https://gitlab.winehq.org/wine/wine/-/merge_requests/4313
This fixes some inconsistency issues when it comes to inner vs outer windows. On second patch I keep ref again to outer windows from the inner windows, and there are several reasons for this:
* It fixes the existing tests to match native IE.
* It simplifies the code (it's always valid now, no second-guessing or what-ifs needed) and gets rid of `outer_window` in HTMLDocumentNode.
* It **fixes** the `outer_window` in HTMLDocumentNode → it was basically prone to crashes in niche cases since it didn't hold a ref before. We can't couple it to the inner `window` field either, because that one gets detached, and that will fail *existing* tests. For example: `events.c:3224: Test failed: put_URL failed: 80004005`.
* Instead of having to keep outer window refs in specific objects, it's simpler to have it consistent everywhere.
--
v2: mshtml: Get rid of outer_window member in HTMLDocumentNode.
mshtml/tests: Improve the iframe navigation test.
mshtml: Remove the inner window ref from the doc only when it is actually
mshtml: Keep the inner window's outer_window pointer alive until it is
mshtml: Don't NULL out the doc's window when unlinking the window.
mshtml: Return outer window to external callers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4312
_(w)environ[] do have a distinct allocation chunk for each entry, so
that _(w)environ[i] pointer and (pointed) string don't change when
updating/deleting any other entry.
Proposed implementation still differs from native:
- allocation is done on process heap, while native uses msvcrt's heap
- first ANSI allocated _environ[] doesn't have per entry allocation.
This is only activated after a change (update/deletion) to _environ[]
is made.
--
v5: msvcrt: Fix getmainargs() family to return correct environment block.
msvcrt: Use msvcrt heap for allocating envionment data.
msvcrt: Test adding UNICODE env variables.
msvcrt/tests: Add tests about intricating kernel32 and msvcrt env calls.
msvcrt/tests: Add tests about allocation of environment entries.
msvcrt: Improve environment tests (initial conditions).
https://gitlab.winehq.org/wine/wine/-/merge_requests/4313
Goes atop !441. The last six commits belong to this MR.
--
v3: vkd3d-shader/spirv: Avoid redundant bool-to-bool conversions in spirv_compiler_emit_movc().
vkd3d-shader/dxil: Implement the DXIL VSELECT instruction.
tests/shader-runner: Introduce an sm6 condition for test directives.
tests/shader-runner: Add tests for 64-bit casts.
vkd3d-shader/spirv: Return an error if an invalid handler is encountered.
tests/shader-runner: Add a test for float comparisons.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/459