cocoa: fix drawing during live resize