On Thu Oct 20 06:30:13 2022 +0000, Zhiyi Zhang wrote:
Eh, I didn't think of this. But notice that 'mode' is the display mode the application wants to change to, not the original mode. So is_primary_display() actually returns the future primary display. Say if we need to detach the current primary display, is_primary_display() will return FALSE here and cause confusion. This is a behavior change compared to the old implementation. Please find another way to do this. Maybe find the primary display name in win32u and pass it to ChangeDisplaySettings()? or keep the old ways or something else.
You're right, I think the best way forward is to improve the non-primary adapter support on all backends. I've opened https://gitlab.winehq.org/wine/wine/-/merge_requests/1116 and https://gitlab.winehq.org/wine/wine/-/merge_requests/1117 for this purpose.
I'm not completely sure about the winemac.drv multi-monitor support, so if it doesn't work I'll probably drop this for now and keep the display mode change non-atomic.