anchor.diff:             (stream-set-input-focus ,old-stream))))))
   
   (defun read-gesture (&key
  -		     (stream *standard-input*)
  -		     timeout
  -		     peek-p
  -		     (input-wait-test *input-wait-test*)
  -		     (input-wait-handler *input-wait-handler*)
  -		     (pointer-button-press-handler
  -		      *pointer-button-press-handler*))
  +                     (stream *standard-input*)
  +                     timeout
  +                     peek-p
  +                     (input-wait-test *input-wait-test*)
  +                     (input-wait-handler *input-wait-handler*)
  +                     (pointer-button-press-handler
  +                      *pointer-button-press-handler*))
     (stream-read-gesture stream
  -		       :timeout timeout
  -		       :peek-p peek-p
  -		       :input-wait-test input-wait-test
  -		       :input-wait-handler input-wait-handler
  -		       :pointer-button-press-handler
  -		       pointer-button-press-handler))
  +                       :timeout timeout
  +                       :peek-p peek-p
  +                       :input-wait-test input-wait-test
  +                       :input-wait-handler input-wait-handler
  +                       :pointer-button-press-handler
  +                       pointer-button-press-handler))
   
   
   ;;; Do streams care about any other events?
   (defun handle-non-stream-event (buffer)
     (let* ((event (event-queue-peek buffer))
  -	 (sheet (and event (event-sheet event))))
  +         (sheet (and event (event-sheet event))))
       (if (and event
  -	     (or (and (gadgetp sheet)
  +             (or (and (gadgetp sheet)
                         (gadget-active-p sheet))
  -		 (not (and (typep sheet 'clim-stream-pane)
  -			   (or (typep event 'key-press-event)
  -			       (typep event 'pointer-button-press-event))))))
  -	(progn
  -	  (event-queue-read buffer)	;eat it
  -	  (handle-event (event-sheet event) event)
  -	  t)
  -	nil)))
  +                 (not (and (typep sheet 'clim-stream-pane)
  +                           (or (typep event 'key-press-event)
  +                               (typep event 'pointer-button-press-event))))))
  +        (progn
  +          (event-queue-read buffer)	;eat it
  +          (handle-event (event-sheet event) event)
  +          t)
  +        nil)))
   
   (defun pop-gesture (buffer peek-p)
     (if peek-p
  
positive.code:        until (or (characterp char) (eq reason :eof))
         do (stream-read-gesture estream) ; consume pointer gesture
         finally (return (if (eq reason :eof)
  			   reason
  			   (char-for-read char))))))
  
  (defmethod stream-listen ((stream standard-extended-input-stream))
    (with-encapsulating-stream (estream stream)
      (loop
         with char and reason
  	 do (setf (values char reason) (stream-read-gesture estream
  							    :timeout 0
  							    :peek-p t))
  	 until (or (characterp char) (eq reason :eof) (eq reason :timeout))
  	 do (stream-read-gesture estream) ; consume pointer gesture
  	 finally (return (characterp char)))))
  
  (defmethod stream-clear-input ((stream standard-extended-input-stream))
    (with-encapsulating-stream (estream stream)
      (loop
         with char and reason
  	 do (setf (values char reason) (stream-read-gesture estream
  							    :timeout 0
  							    :peek-p t))
  	 until (or (eq reason :eof) (eq reason :timeout))
  	 do (stream-read-gesture estream) ; consume pointer gesture
  	 ))
    nil)
  
  ;;; stream-read-line returns a second value of t if terminated by eof.
  (defmethod stream-read-line ((stream standard-extended-input-stream))
    (with-encapsulating-stream (estream stream)
      (let ((result (make-array 1
  			      :element-type 'character
  			      :adjustable t
  			      :fill-pointer 0)))
        (loop for char = (stream-read-char estream)
  	    while (and (characterp char) (not (char= char #\Newline)))
  	    do (vector-push-extend char result)
  	    finally (return (values (subseq result 0)
  				    (not (characterp char))))))))
  
  ;;; stream-read-gesture on string strings.  Needed so
  ;;; accept-from-string "just works"
  
negative.code: 
  (defmacro define-gesture-name (name type gesture-spec &key (unique t))
    `(add-gesture-name ',name ',type ',gesture-spec ,@(and unique
                                                           `(:unique ',unique))))
  
  (defun delete-gesture-name (name)
    "Delete the gesture named by the symbol `name' from the list of
  