Changing screen resolution on primary screen causes a few undesirable effects on the second (Nvidia GPU + Windows 7, don't know how it behaves on any other OS):
1. None of the third party windows there will properly repaint themselves at any screen resolution change event and get garbled. A few affected examples: Windows task manager, Firefox and Visual studio. Besides VS i would expect thous third party programs to be, in relevant areas, error free or sufficiently close to it - so, i have only Windows, Nvidia and myself left to blame. Not terribly helpful.
2. Second monitor contents will be displaced (in my setup the second monitor extends the desktop after the first - hence the displacement makes sense from the OS point of view, but is detrimental nonsense in my context).
Context: screen resolution change is for Vulkan rendering in fullscreen window.
Screen resolution is changed first (with CDS_FULLSCREEN as its flags parameter). Then the window (WS_POPUP|WS_CLIPSIBLINGS|WS_CLIPCHILDREN) covering the full screen area.
Given that - i do not see how i could communicate my intent for the OS and prevent the displacement. I have seen plenty programs that fail in the same manner, but have seen a few that do not - so, there likely is an solution. It could be that this is a Vulkan specific problem (DX, i am fairly sure, can just directly express the intent to the OS - aka. ask for "exclusive mode"). Cannot easily test it currently, but could this work: retrieve second monitor desktop coordinates - change primary monitor - set the second monitor desktop coordinates back? Or is there a way to prevent the OS from mucking with the second monitor to begin with (which would likely fix both of the problems)?
Problem nr 1 - i have no idea what to do about.
edit: Noticed that several months ago VK_EXT_full_screen_exclusive popped up. However it seems to just allow explicit allow/disallow of switching to exclusive mode. Nvidia switches to exclusive mode by default - which causes some of the screen resolution change behaviors (even if already was at the desired resolution). I suspect that switching it off would prevent or help with second monitor garbling (ie. i suspect Nvidia drivers are at least partly to blame). However, support for this extension is currently nearly non-existent (via vulkan gpuinfo page). So, cannot even test that.