Another breakthrough! This time for users who don't have a second Mac. If you follow the instructions here, the whole window resizing problem goes away:
https://forums.macrumors.com/showthread.php?p=17238860#post17238860
However, it is a fairly "dirty" method of doing it. The problem is caused by OSX not detecting the new monitor properly. On my machine, the main plist file only had my old monitor in there.
If you feel like downloading Xcode (it's free) or another plist editor, you can do a proper fix.
- Copy your com.apple.windowserver.plist to somewhere safe as a backup
- Take another copy to work on in a temporary folder
- Take a copy of the user com.apple.windowserver.[GUID].plist file to work on in your temporary folder
- Copy the user plist file to somewhere safe as a backup
- Open both temp files in Xcode by right-clicking on them and selecting Open with ... Xcode
- In the main plist, delete the DisplayAnyUserSets node entirely (don't worry, OSX will rebuild it)
- In the main plist, open up the node /DisplaySets/Item 0/Item 0/
- In the user plist, open up the DisplaySets node and start hunting through the Item nodes for your 4k monitor - it may not be the first and the resolution is the best hint
- Check for differences between the user plist and main plist for IODisplayLocation, DisplaySerialNumber, DisplayID, DisplayProductID and DisplayVendorID. Copy them across from the user plist if they are different.
- In the main plist, check that Mode and UnmirroredMode are both set to 82.
- In the main plist, set the Width and UnmirroredWidth to 3840.
- In the main plist, set Height and UnmirroredHeight to 2160.
- In the main plist, check that IOFlags is set to 7.
- Close Xcode and Option-drag the main plist back into Library/Preferences -- you'll need to enter your password to do this.
- Delete the user plist from ~user/Library/Preferences/ByHost/
- Restart your machine
Warnings: This was done on a Mac Pro 4,1 with 7950 and a single P2715Q monitor attached to it. The instructions would probably be very different for a laptop.
Side effects: I don't have to use the Option key to see my preferred resolution of 3200x1800 in Display Settings, it's already there.
It doesn't get rid of the flicker.
My desktop animations are now much smoother.
Bonus points available: in theory, it should be possible to get 10bit colour working on my P2715Q but I'll leave that for another day.