2 Frame callback lifecycle🔗ℹ

The procedure supplied with #:frame-cb is called as (frame-cb call-time frame). Its return value is ignored. The call-time argument has the following meanings.

  • 'before-show is called after the frame has been fully created, positioned, resized, numbered, and supplied with the callback, but before show is called. This is the preferred point for changes that should already be visible when the window first appears, such as changing the title.

  • 'after-show is called immediately after show has been called. It can be used for actions that require a shown frame.

  • 'wait-for-close is called only when #:wait? #t is in effect, immediately before rkdt starts waiting for the frame to close.

  • 'on-close is called while the frame’s close event is being handled. At that point its geometry has been stored, its internal number has been released for reuse, and the close semaphore has been posted.

Thus, without waiting, the normal lifecycle is 'before-show, 'after-show, and eventually 'on-close. With #:wait? #t, 'wait-for-close occurs between 'after-show and 'on-close.