Fixed window resizing of Cocoa windows
Restored some of the code removed in 363b3726, which resulted in window resizing with Cocoa not working properly (red background).
Unfortunately, the crash in macOS 10.15.4 that that commit fixed is now a problem again.
Backport: release
Edited by T.J. Corona