This adds Mach thread priority support (both in the application and realtime band) and recalculates thread priorities when the process priority changes.
Part 3, which is still a bit WIP deals with implementing priority boosts (for main threads and threads which are processing window messages), effectively fully replacing https://gitlab.winehq.org/wine/wine/-/merge_requests/1232.
Currently the implementation in this MR already technically overrides what https://gitlab.winehq.org/wine/wine/-/merge_requests/1232 does, if it makes sense I can also revert it here.
I added a few comments regarding the Mach thread priority API usage, as there is limited documentation available, and much was inferred from the source or by testing. If this is too verbose I can also remove that...
--
v3: server: Apply Mach thread priorities after process tracing is initialized.
server: Implement apply_thread_priority on macOS for realtime priorities.
server: Implement apply_thread_priority on macOS for application priorities.
kernel32/tests: Setting process priority on a terminated process should succeed.
server: Also set thread priorities upon process priority change.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7317
Instead of checking for monitor rect.
Similar purpose as https://gitlab.winehq.org/wine/wine/-/merge_requests/7362
--
v2: winewayland: Pass fullscreen flag to is_window_managed.
winex11: Pass fullscreen flag to is_window_managed.
winex11: Check managed window changes in WindowPosChanged.
winex11: Request managed window changes asynchronously.
winex11: Initialize window managed flag in create_whole_window.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7370