Changeset 7574


Ignore:
Timestamp:
Oct 31, 2007, 6:07:08 AM (12 years ago)
Author:
gb
Message:

Use documented foreign function calls (only) in ENABLE-FOREGROUND.
Need to double-check to ensure that that all works on PPC/Tiger
as well.

The old mechanism - CPSEnableForeground - was generating deprecation
warnings in /var/log/system.log. (Along with all of the usual messages
about Xcode memory leaks ...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/cocoa-ide/cocoa-window.lisp

    r7560 r7574  
    151151    "LispApplicationDelegate")
    152152
     153
    153154#+apple-objc
    154155(defun enable-foreground ()
    155   (%stack-block ((psn 8))
    156     (external-call "_GetCurrentProcess" :address psn)
    157     (external-call "_CPSEnableForegroundOperation" :address psn)
    158     (eql 0 (external-call "_SetFrontProcess" :address psn :signed-halfword))))
     156  (rlet ((psn :<P>rocess<S>erial<N>umber))
     157    (#_GetCurrentProcess psn)
     158    (#_TransformProcessType psn #$kProcessTransformToForegroundApplication)
     159    (eql 0 (#_SetFrontProcess psn))))
    159160
    160161;;; I'm not sure if there's another way to recognize events whose
Note: See TracChangeset for help on using the changeset viewer.