Changeset 773


Ignore:
Timestamp:
Apr 13, 2004, 7:17:47 PM (15 years ago)
Author:
gb
Message:

Key events are interned, so don't make them mutable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/hemlock/src/cocoa-hemlock.lisp

    r760 r773  
    1313  (thunk nil))
    1414
     15(defstruct (event-queue-node (:include ccl::dll-node))
     16  event)
     17
     18(defun event-queue-insert (q node)
     19  (ccl::locked-dll-header-enqueue node q)
     20  (ccl::signal-semaphore (frame-event-queue-signal q)))
    1521
    1622(defun enqueue-key-event (q event)
    17   (ccl::locked-dll-header-enqueue event q)
    18   (ccl::signal-semaphore (frame-event-queue-signal q)))
     23  (event-queue-insert q (make-event-queue-node :event event)))
    1924
    2025(defun dequeue-key-event (q)
     
    2934(defun unget-key-event (event q)
    3035  (ccl::with-locked-dll-header (q)
    31     (ccl::insert-dll-node-after event q))
     36    (ccl::insert-dll-node-after (make-event-queue-node event) q))
    3237  (ccl::signal-semaphore (frame-event-queue-signal q)))
    3338
     
    7479
    7580(defmacro abort-key-event-p (key-event)
    76   `(member ,key-event editor-abort-key-events))
     81  `(member (event-queue-node-event ,key-event) editor-abort-key-events))
    7782
    7883
    7984(defun get-key-event (q &optional ignore-pending-aborts)
    8085  (do* ((e (dequeue-key-event q) (dequeue-key-event q)))
    81        ((typep e 'hemlock-ext:key-event)
     86       ((typep e 'event-queue-node)
    8287        (unless ignore-pending-aborts
    8388          (when (abort-key-event-p e)
    8489            (beep)
    8590            (throw 'editor-top-level-catcher nil)))
    86         (setq *last-key-event-typed* e))
     91        (setq *last-key-event-typed* (event-queue-node-event e)))
    8792    (if (typep e 'buffer-operation)
    8893      (funcall (buffer-operation-thunk e)))))
Note: See TracChangeset for help on using the changeset viewer.