Changeset 15263


Ignore:
Timestamp:
Mar 21, 2012, 12:14:21 AM (8 years ago)
Author:
rme
Message:

Fix for listener buffer name conflicts from trunk.

Location:
release/1.8/source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/1.8/source

  • release/1.8/source/cocoa-ide/cocoa-listener.lisp

    r15183 r15263  
    427427  nil)
    428428
    429 
     429(defun listener-window-count ()
     430  (let ((count 0)
     431        (all-windows (#/windows *NSApp*)))
     432    (dotimes (i (#/count all-windows) count)
     433      (let* ((w (#/objectAtIndex: all-windows i))
     434             (wc (#/windowController w)))
     435        (when (typep wc 'hemlock-listener-window-controller)
     436          (incf count))))))
    430437
    431438(objc:defmethod #/init ((self hemlock-listener-document))
     
    443450    doc))
    444451
    445 (def-cocoa-default *initial-listener-x-pos* :float -100.0f0 "X position of upper-left corner of initial listener")
     452(def-cocoa-default *initial-listener-x-pos* :float 100.0f0 "X position of upper-left corner of initial listener")
    446453
    447454(def-cocoa-default *initial-listener-y-pos* :float 100.0f0 "Y position of upper-left corner of initial listener")
     
    451458
    452459(objc:defmethod (#/dealloc :void) ((self hemlock-listener-document))
    453   (if (zerop (decf *cocoa-listener-count*))
     460  (when (zerop (listener-window-count))
    454461    (setq *next-listener-x-pos* nil
    455           *next-listener-y-pos* nil))
     462          *next-listener-y-pos* nil
     463          *cocoa-listener-count* 0))
    456464  (let* ((p (hemlock-document-process self)))
    457465    (when p
Note: See TracChangeset for help on using the changeset viewer.