The goal of this MR is to set up the minimum necessary infrastructure to display the contents of some simple, software rendered windows. This involves two major steps:
1. Associate a window with a Wayland surface and give it the `xdg_toplevel` role, so that the compositor can display it. We also have to implement the required initial `xdg_surface` configuration sequence to be able to safely (i.e., without the compositor disconnecting us with an error) attach buffers to the surface in step (2).
2. Implement the `window_surface` interface for the Wayland driver. For now we provide a simple (and suboptimal) `window_surface_flush` implementation: for each flush we create a new `wl_shm` buffer, copy the whole window contents (ignoring damaged bounds for now) into it and attach it to the target Wayland surface. In the next MR I will optimize this implementation in multiple ways: a. implement a buffer queue to avoid constantly allocating new buffers b. respect the damaged bounds of the `window_surface` to minimize copying of data from the `window_surface` to the SHM buffer (and also for correctness) c. communicate damaged surface regions to the compositor to (potentially) allow more efficient texture uploads.
With this MR many (software-rendered) applications can now display dynamic content on screen. We can't interact with the apps yet, but we do get to enjoy `notepad` in all its blinking-cursor glory.
Thanks!
--
v2: winewayland.drv: Implement a simple window_surface flush.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2944
Some of these fixes are subtle (like the first patch) and very annoying to debug. Although the first patch looks like a hack, surprisingly, it's how the spec itself says it is! It's not even an IE quirk, but a special case in the spec.
For example, the variable name (which holds the builtin eval func) **does** matter: if it's called something other than 'eval', it gets treated differently (as if indirect), and this is verified by the tests + the spec's wording (so Microsoft's implementation follows it).
Most of the patches other than the first 2 are pretty small so they're in same MR.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2942
To be merged after !2907.
--
v3: wineoss: Use mmdevapi's AudioClient's GetService.
winecoreaudio: Use mmdevapi's AudioClient's GetService.
winealsa: Use mmdevapi's AudioClient's GetService.
winepulse: Move AudioClient's GetService into mmdevapi.
wineoss: Use mmdevapi's session_wrapper_create.
winecoreaudio: Use mmdevapi's session_wrapper_create.
winealsa: Use mmdevapi's session_wrapper_create.
winepulse: Move session_wrapper_create into mmdevapi.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2908
This allows access to the in-process cached monitor list and reduces the number of registry calls issued for QueryDisplayConfig (in case of no change) from `4 x monitors` to `1`.
--
v2: win32u: Move QueryDisplayConfig from user32.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2957
This allows access to the in-process cached monitor list and reduces the number of registry calls issued for QueryDisplayConfig (in case of no change) from `4 x monitors` to `1`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2957
--
v3: ntdll: Add return address information in __wine_debug_context.
ntdll: Add file and line information in __wine_debug_context.
ntdll: Introduce struct __wine_debug_context for extensible debug info.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2274