These patches fix painting in an application that draws outside of a CS_PARENTDC child
client area in its WM_PAINT handler.
Comments and suggestions are welcome.
--
v4: win32u: Use parent rectangle for visible region calculations of a CS_PARENTDC child.
win32u: Don't clip update region to the window client rectangle.
win32u: GetUpdateRect() should clip update rectangle to the window client area.
win32u: GetUpdateRgn() should clip update region to the window client area.
win32u: Clip PAINTSTRUCT.rcPaint to the window client area.
server: For a CS_PARENTDC child use parent for visible region calculations.
server: If the being validated region covers whole window then validate everything.
user32/tests: Add a message test for listbox redrawing after LB_SETCOUNT.
user32/tests: Test BeginPaint() clipbox of cropped window with CS_PARENTDC.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5665
--
v6: win32u: Avoid changing thread DPI context in process_hardware_message.
win32u: Factor hardware message point DPI mapping together.
win32u: Use map_window_points with explicit DPI over screen_to_client.
win32u: Split hardware message window lookup to a separate helper.
win32u: Use per-monitor DPI window_from_point in process_mouse_message.
win32u: Parameterize window_from_point dpi.
server: Pass window's per-monitor DPI in set_window_pos.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5819
We need to look at the Setup key for the driver, as it can be different
compare to the actually driver.
For example, mysql uses the same Setup file to configure both the Ascii/Unicode
vession but has a different file for the actual ODBC functions.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5858
On Mon Jun 17 07:53:48 2024 +0000, darkblaze69 wrote:
> With this MR since 71ff81b apps don't launch with wayland driver,
> showing these errors after some timeouts.
> So we can't use wayland now.
> ```
> 0138:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0
> "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread
> 0138, blocked by 0134, retrying (60 sec)
> 0144:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0
> "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread
> 0144, blocked by 0134, retrying (60 sec)
> 014c:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0
> "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread
> 014c, blocked by 0134, retrying (60 sec)
> ```
Sorry about that, https://gitlab.winehq.org/wine/wine/-/merge_requests/5857 should fix the problem.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5833#note_73393
Overriding the SDL_VIDEODRIVER variable (for Wayland support as an example)
on the Linux side can lead to some games under Wine failing to load (so treat
that variable as special).
--
v4: ntdll: Add SDL_AUDIO*/SDL_VIDEO* to the special variables list.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5231
With this MR since 71ff81b apps don't launch with wayland driver, showing these errors after some timeouts.
So we can't use wayland now.
```
0138:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0 "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread 0138, blocked by 0134, retrying (60 sec)
0144:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0 "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread 0144, blocked by 0134, retrying (60 sec)
014c:err:sync:RtlpWaitForCriticalSection section 7BF9B2E0 "../wine/dlls/ntdll/loader.c: loader_section" wait timed out in thread 014c, blocked by 0134, retrying (60 sec)
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5833#note_73375
This MR adds support for creating file mapping objects backed by large pages on Linux, by making the following changes:
## wineserver
* On Linux, `create_temp_file` will first attempt to use memfds as the backing fd. If it fails, it'll return to the current codepath, creating a temporary file in either the server or config directory.
* The created memfd will be sealed against writes, if the caller requesting the appropriate page protection flags.
* This removes the requirement that FDs be only created on filesystems/directories that aren't `noexec`.
* In the server method `create_mapping` , if large pages have been requested by the caller, hold that the calling thread's token holds `SeLockMemoryPrivilege` .
* Additionally, add `SeLockMemoryPrivilege` to the list of privileges enabled for the Administrator.
## `ntdll`
* Add `virtual_get_min_large_page_size` and its exported wrapper `wine_unix_get_min_large_page_size`.
* On Linux, the minimum page size is determined by going through `/sys/kernel/mm/hugepages`. If hugepage support was not detected, `STATUS_NOT_SUPPORTED` is returned instead. On other platforms, the older hard-coded value of 2\*1024\*1024 is returned instead.
* `NtCreateSection` will validate certain parameters if large pages are requested. Specifically, it will return STATUS_INVALID_PARAMETER if the requested mapping is not anonymous/unnamed, or the size is not a multiple of the minimum supported page size.
## `kernelbase`
* `GetLargePageMinimum` will use `wine_unix_get_min_large_page_size`.
## `kernel32/tests`
* Add new test test_large_page_file_mapping, which validates privilege enforcements and parameter validation while creating large pages backed file mapping obejcts. The tests are skipped if `GetLargePageMinimum` returns 0.
--
v17: ntdll: mlock mapped pages for views created with SEC_LARGE_PAGES.
kernel32: Add tests for large page mapping support.
ntdll: Validate parameters to NtCreateSection if large pages are requested.
server: Use memfd to back anonymous mappings on Linux.
kernelbase: Implement GetLargePageMinimum by returning the value of LargePageMinimum in _KUSER_SHARED_DATA.
server: Set LargePageMinimum in _KUSER_SHARED_DATA on Linux.
server: Require SeLockMemoryPrivilege to create large page mappings.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5769
It turns out that message sequences with "wine_only" messages, although they don't cause a test failure on Windows, do cause `ok_sequence_` to log a failure, so that it dumps the sequence. We need `ok_sequence_` to treat these as skippable messages on Windows so that it ignores the failure to match them.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5853
Trace output with PulseAudio:
```
0144:trace:mmdevapi:adjust_timing Requested duration 1000000 and period 0
0144:trace:mmdevapi:adjust_timing Device periods: 26666 default and 26666 minimum
0144:trace:mmdevapi:adjust_timing Adjusted duration 1000000 and period 100000
```
--
v4: winepulse: Don't set a floor for the period(s).
mmdevapi: Set the default period to a minimum of 10 ms.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5810
Trace output with PulseAudio:
```
0144:trace:mmdevapi:adjust_timing Requested duration 1000000 and period 0
0144:trace:mmdevapi:adjust_timing Device periods: 26666 default and 26666 minimum
0144:trace:mmdevapi:adjust_timing Adjusted duration 1000000 and period 100000
```
--
v3: winepulse: Don't cap period(s).
mmdevapi: Cap default period to 10 ms.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5810
Instead of accessing the surface with macdrv_get_surface_display_image.
--
v5: winemac: Remove now unnecessary cocoa window surface pointer.
winemac: Push window surface image updates to the main thread.
winemac: Create window surface CGImageRef on surface flush.
winemac: Create a provider for the surface and a HBITMAP wrapping it.
winemac: Remove unused macdrv_get_surface_display_image copy_data parameter.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5798