Calling write_current_mode() in add_gpu seems weird. Not to mention write_current_mode() actually writes the current mode for the last source. write_current_mode() is also called at multiple places. It just seems that it should be called at one appropriate place and that's it.
Also, why is this patch necessary?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5422#note_67593
'add_physical_source' here just doesn't look consistent with other functions in device_manager. Maybe add a "BOOL is_physical" or something in struct device_manager_ctx so that when both is_physical and is_virtual_desktop() are TRUE we report sources as detached. Then we set is_physical to FALSE and start adding sources for the virtual desktop. Use your best judgment.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5422#note_67592
I don't think These physical sources should be visible in EnumDisplayDevices(). If you report a physical source, doesn't that mean I can attach it? by calling ChangeDisplaySettings() with a valid mode?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5422#note_67589
This introduces a custom `VkPresentSurfacesInfoWine` struct to the driver queue present. It could very well be a separate vkQueuePresent parameter, now that the driver interface is manually written.
For now it provides the swapchains HWND, for vulkan_surface_presented, which is mostly just for winewayland purposes. Later I intend to change it to pass win32u surfaces wrappers.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5482
--
v3: win32u: Split virtual desktop modes to a add_virtual_modes helper.
win32u: Delay writing current display settings to the registry.
winex11: Let win32u decide when to force update the display cache.
win32u: Don't force refresh the display cache on thread desktop change.
winex11: Report all sources as detached in virtual desktop mode.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5422