The Racket repository
Go to file
Matthew Flatt b336194cf4 racket/gui Cocoa: disable App Nap; switch to GUI mode more lazily
On 10.9 and later, `racket/gui` now disables App Nap. Otherwise, a
program like

 #lang racket/base
 (require racket/class
          racket/gui/base)

 (define T 0.05)

 (let loop ([prev (current-inexact-milliseconds)])
   (sleep T)
   (define now (current-inexact-milliseconds))
   (define delta (- now prev))
   (when (delta . > . (* 2000 T))
     (printf "long wait ~a at ~a\n" delta now))
   (loop now))

will start to report a wait of more than 10 seconds, as App Nap
puts the process to sleep.

Relatedly, when `racket/gui` is started via plain `racket` (as opposed
to GRacket), then it starts in "accessory" mode instead of "regular"
mode, which means that the application does not appear in the dock
or have a menu bar. As soon as a frame is shown or a root menu bar
is created, the application is promoted to "regular" mode. This works
in 10.7 and later.
2014-10-01 13:13:37 -06:00
native-pkgs@4bc36e704d racket/draw Windows: patch Cairo for clipped DC surface creation 2014-09-25 16:17:29 -06:00
pkgs racket/gui Cocoa: disable App Nap; switch to GUI mode more lazily 2014-10-01 13:13:37 -06:00
racket syntax/parse: support pvar:literal patterns 2014-10-01 10:39:56 -04:00
.gitattributes
.gitignore Add add-on to .gitignore. 2013-07-04 11:51:53 -04:00
.gitmodules access "native-pkgs" as a git submodule 2013-07-26 22:36:20 -06:00
.mailmap mailmap updates & fixes. 2013-04-03 18:10:22 -04:00
.travis.yml Send fewer emails from Travis. 2014-07-25 17:30:09 -04:00
INSTALL.txt distro-build: add "versionless" option 2014-06-23 18:42:46 +01:00
Makefile make installer: prevent pollution from local to catalog-based build 2014-09-25 14:00:00 -06:00
README.txt 2013 -> 2014 2014-01-21 15:02:21 -05:00

This is the source code for the main Racket distribution.  See
"INSTALL.txt" for information on building Racket.

License
-------

Racket
Copyright (c) 2010-2014 PLT Design Inc.

Racket is distributed under the GNU Lesser General Public License
(LGPL).  This means that you can link Racket into proprietary
applications, provided you follow the rules stated in the LGPL.  You can
also modify Racket; if you distribute a modified version, you must
distribute it under the terms of the LGPL, which in particular means
that you must release the source code for the modified software.  See
racket/src/COPYING_LESSER.txt for more information.