[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Not hiding modal dialogs

In article <1993May12.210850.29902@aplcen.apl.jhu.edu> I wrote:

	[in part, in answer to Mark Tapia's query about disappearing
	sometimes-modal dialog windows]

>And then specialize set-window-layer:
>(defmethod set-window-layer ((w my-window) new-layer 
>			     &optional include-invisibles)
>   (unless (modal-p w)
>      (call-next-method)))
>These changes seem to make your sometimes-modal window work the way
>you want.

This is not quite correct. It works in Mark's example because he
explicitly selects the window before calling modal-dialog. You do need
to let modal-dialog set the window layer to 0, however, in the general
case. The above should have been, therefore, something like:

(defmethod set-window-layer ((w my-window) new-layer
			     &optional include-invisibles)
  (if (modal-p w)
    (call-next-method w 0 include-invisibles)
    (call-next-method w new-layer include-invisibles)))

John Gersh                                      John_Gersh@jhuapl.edu
The Johns Hopkins University Applied Physics Laboratory
Johns Hopkins Rd., Laurel, MD 20723		       (301) 953-5503