[racket-dev] gracket on retina
At Wed, 27 Feb 2013 12:31:06 -0500, David Van Horn wrote:
> Having recently upgraded to a retina display mac, I see the problem
> pointed out in this PR:
>
> http://bugs.racket-lang.org/query/?cmd=view&pr=12909
>
> Is there some way for me to help? If pointed in the right direction, I
> can try to patch things. Short of that, I can be a guinea pig.
>
> David
Unfortunately, I have no idea of what needs to be done. I think either
XCode or NSApplicationMain() must do the right magic to make applications
work in Retina-display mode, and somehow we have to recreate that.
Essentially all OS/Cocoa interaction for `racket/gui' is implemented
dynamically via the FFI, as opposed to static configuration that XCode
normally installs for a GUI application. Also, we can't call
NSApplicationMain(), because it takes over the process.
The `racket/gui' startup for Cocoa is mostly here:
collects/mred/private/wx/cocoa/queue.rkt
For example, you'll see the call to TransformProcessType() that can
turn a console-started `racket' process into a GUI process.
The "Working without a nib" series of blog posts provides a flavor of
what `racket/gui' has to do:
http://lapcatsoftware.com/blog/2007/05/16/working-without-a-nib-part-1/
That was written long before Retina displays, though, and I haven't run
across any updates that look relevant.