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

Suicidal windows



I'm trying to create a class of window that has a rather
temporary existence: It must die if the user clicks on it
or if it gets covered by any other window, thus becoming
something other than the frontmost window.

The first part is easy to do by defining a view-click-event-handler
that calls window-close.

The second one baffles me. OK, I have tried the 'obvious' one that
doesn't work, and yes, it sends MCL into an infinite recursion:

(defclass tempo-window (window) ())

(defmethod view-deactivate-event-handler :around
           ((w tempo-window))
  (call-next-method)
  (window-close w))

....(Don't try it unless you enjoy the re-booting sound).

Any ideas on how to do this properly would be appreciated. (at the
moment I cheat by just moving the window off-screen ...yuk).

Cheers,
Dimitri



--

Dimitri Simos                               dim@lissys.demon.co.uk
__________________________________________________________________
Lissys Ltd.                 Tel.(Voice & Fax): UK (+44) 509 235620