/[mcclim]/mcclim/frames.lisp
ViewVC logotype

Diff of /mcclim/frames.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.65 by hefner1, Mon Jul 14 19:41:44 2003 UTC revision 1.66 by hefner1, Tue Jul 15 04:16:18 2003 UTC
# Line 172  FRAME-EXIT condition.")) Line 172  FRAME-EXIT condition."))
172    
173  (defclass standard-application-frame (application-frame)  (defclass standard-application-frame (application-frame)
174    ((event-queue :initarg :frame-event-queue    ((event-queue :initarg :frame-event-queue
175                    :initarg :input-buffer
176                    :initform nil
177                  :accessor frame-event-queue                  :accessor frame-event-queue
178                  :documentation "The event queue that, by default, will be                  :documentation "The event queue that, by default, will be
179    shared by all panes in the stream")    shared by all panes in the stream")
# Line 183  FRAME-EXIT condition.")) Line 185  FRAME-EXIT condition."))
185  ;;; Support the :input-buffer initarg for compatibility with "real CLIM"  ;;; Support the :input-buffer initarg for compatibility with "real CLIM"
186    
187  (defmethod initialize-instance :after ((obj standard-application-frame)  (defmethod initialize-instance :after ((obj standard-application-frame)
188                                         &key (input-buffer nil input-buffer-p))                                         &key &allow-other-keys)
189    (cond (input-buffer-p    (unless (frame-event-queue obj)
190           (setf (frame-event-queue obj) input-buffer))      (setf (frame-event-queue obj) (make-instance 'standard-event-queue))))
         ((not (slot-boundp obj 'event-queue))  
          (setf (frame-event-queue obj) (make-instance 'standard-event-queue)))  
         (t nil)))  
191    
192    
193  (defmethod (setf frame-manager) (fm (frame application-frame))  (defmethod (setf frame-manager) (fm (frame application-frame))
# Line 297  FRAME-EXIT condition.")) Line 296  FRAME-EXIT condition."))
296  (define-condition frame-exit (condition)  (define-condition frame-exit (condition)
297    ((frame :initarg :frame :reader %frame-exit-frame)))    ((frame :initarg :frame :reader %frame-exit-frame)))
298    
299    ;; I make the assumption here that the contents of *application-frame* is
300    ;; the frame the top-level loop is running. With the introduction of
301    ;; window-stream frames that may be sharing the event queue with the main
302    ;; application frame, we need to discriminate between them here to avoid
303    ;; shutting down the application at the wrong time.
304    ;; ...
305    ;; A better way to do this would be to make the handler bound in
306    ;; run-frame-top-level check whether the frame signalled is the one
307    ;; it was invoked on..                    -- Hefner
308    
309  (defmethod frame-exit ((frame standard-application-frame))  (defmethod frame-exit ((frame standard-application-frame))
310    (signal 'frame-exit :frame frame))    (if (eq *application-frame* frame)
311          (signal 'frame-exit :frame frame)
312        (disown-frame (frame-manager frame) frame)))
313    
314  (defmethod frame-exit-frame ((c frame-exit))  (defmethod frame-exit-frame ((c frame-exit))
315    (%frame-exit-frame c))    (%frame-exit-frame c))
# Line 331  FRAME-EXIT condition.")) Line 342  FRAME-EXIT condition."))
342      (let ((query-io (frame-query-io frame)))      (let ((query-io (frame-query-io frame)))
343        (unwind-protect        (unwind-protect
344             (if query-io             (if query-io
345                 (with-input-focus (query-io)                 (with-input-focus (query-io)
346                   (call-next-method))                   (call-next-method))
347                 (call-next-method))                 (call-next-method))
348          (case original-state          (case original-state

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.66

  ViewVC Help
Powered by ViewVC 1.1.5