Changeset 541


Ignore:
Timestamp:
Feb 15, 2004, 8:19:45 AM (21 years ago)
Author:
Gary Byers
Message:

Change PROCESS-INTERRUPT mechanism, since postEvent:atStart: doesn't seem
to always do so from subthreads.

File:
1 edited

Legend:

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

    r487 r541  
    6363
    6464(defconstant process-interrupt-event-subtype 17)
     65
     66
     67
     68
     69(defclass lisp-application (ns:ns-application)
     70    ((termp :foreign-type :<BOOL>))
     71  (:metaclass ns:+ns-object))
     72
     73
     74(define-objc-method ((:void :post-event-at-start e) ns:ns-application)
     75  (send self :post-event e :at-start t))
    6576
    6677;;; Interrupt the AppKit event process, by enqueing an event (if the
     
    8899                      :data2 0)))
    89100        (send e 'retain)
    90         (send *NSApp* :post-event e :at-start t)))))
    91 
    92 
    93 (defclass lisp-application (ns:ns-application)
    94     ((termp :foreign-type :<BOOL>))
    95   (:metaclass ns:+ns-object))
    96 
    97 
     101        (send *NSApp*
     102              :perform-selector-on-main-thread (@selector
     103                                                "postEventAtStart:")
     104              :with-object e
     105              :wait-until-done t)))))
    98106
    99107#+apple-objc
Note: See TracChangeset for help on using the changeset viewer.