Track the xdg state we have requested from the compositor and take
it into account when sending xdg state update requests.
This fixes a race which would cause us to miss a state update if
we haven't yet processed the compositor's configure reply to a
previous state request. For example:
0. Initial state: win32 fullscreen, xdg fullscreen
1. Window becomes windowed, we send xdg unset_fullscreen request
2. Window becomes fullscreen, before compositor's xdg "not fullscreen"
reply arrives, so we still consider the current xdg state to be
fullscreen and thus do not request an xdg fullscreen state
3. Compositor xdg configure "not fullscreen" arrives
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7525
This is the continuation of https://gitlab.winehq.org/wine/wine/-/merge_requests/7317.
There are a lot of smaller commits (some even no-op renames), because there are some inconsistencies in the codebase currently of what an NT thread priority vs a base thread priority should be and I hope that this clears that up a bit.
I tried making the commits as atomic as possible I hope this is fine... There are still a few tiny details missing like fixing up the `list_processes` request and `KeSetPriorityThread` and friends which are either stubs or not correctly working as well.
There are also probably a few tests that can be written here (after thread priority boosting has been disabled, cause that makes the behavior on windows very flaky and dynamic). In fact on windows there is some thread priority boost decay going on after the message has been processed (and probably other boosting mechanisms), which this MR does not properly capture, but are also probably not reasonable to implement.
This also reverts the commits of https://gitlab.winehq.org/wine/wine/-/merge_requests/1232, which are being effectively overwritten anyways.
The `get_thread_priority_info` request was added, because the reply in `get_thread_info` would be otherwise larger than 64 bytes, so it had to be split.
--
v2: Revert "ntdll: Set the QoS class of the main Wine thread on macOS."
Revert "ntdll: Fix runtime availability check for pthread_attr_set_qos_class_np."
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7516
This WIP branch prototypes the usage of virtual display devices (through "virtual desktop" mode at the moment) to support display mode emulation in the Wayland driver.
It works by allowing the driver to mark each host adapter with a virtual_id, which, if present, signals to win32u that it should include the adapter in the virtual display configuration. The virtual configuration (along with the virtual ids) is reported back to the driver though a new user driver function. If none of the host adapters is marked with a virtual id (i.e., all other drivers) we fall back to the single virtual display mode as before.
Some deficiencies and open questions with the prototype:
1. Virtual desktop mode implies a lot of behavior that we don't want at this point the Wayland driver (e.g., taskbar window, changing the display mode to the virtual desktop resolution at startup, some changes in fsclip behavior). One way forward would be to have a "virtual display devices" mode separate from the "virtual desktop" mode, so that drivers can opt in only to the desired behavior (virtual desktop would imply virtual devices, to maintain the current behavior).
2. It's not clear to me what would be the best way for a driver to opt in or out of certain core behavior. Perhaps the driver would change some volatile registry key which other components would consult? Or introduce a user driver function for core to query the driver about such features on demand? Is there some precedence I can get inspiration from?
3. At the moment, the prototype calls the new "NotifyVirtualDevices" user driver callback only in the process which the display update occurred. This means that other processes don't get notified of the virtual devices mapping to host devices, so, in the Wayland driver case, we are not able to scale windows from those processes properly. One approach would be for core to ensure that the NotifyVirtualDevices callback is called once in all processes, but I am not sure what's the best way to achieve this (or even if this is the preferred approach). Another way would be to have a mechanism for the driver to query the virtual device info (+mappings) on demand, and just broadcast a message to all windows. In this case it could even be done internally by the driver (so more in line with what the part-12 MR is doing), if we don't want to introduce a more global behavior. Perhaps there is some even better mechanism, which would also be more fitting to how we envision the virtual display/devic
es to evolve going forward.
Let me know what you think!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5057