Note the original FIXME: refered to GLFWs Cocoa implementation, which is largely what this commit provides.