CLIM mail archive

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

How to detect killed windows?




Nichael Cramer writes:
 > 1] Is there any way I can directly query a frame to see if it has been
 > killed?  This is especially relevant if it has been killed in a non
 > CLIM-like way; for example by the window manager.
 > 
	...

I experimented with the accessor CLIM:FRAME-STATE in the Franz CLIM 2
implementation, within the twm window manager, with the following
results:

CLIM-USER(13): (setq a (make-application-frame 'test))
#<TEST @ #x5ebe9a>
CLIM-USER(14): (frame-state a) ;new frame, not running
:DISOWNED
CLIM-USER(15): (run-frame-top-level a) 
NIL
CLIM-USER(16): (frame-state a) ;after frame-exit
:DISABLED
CLIM-USER(17): (run-frame-top-level a)
NIL
CLIM-USER(18): (frame-state a) ;after killing window in twm
:DISABLED

In sum, the frame-state starts out as :DISOWNED and is apparently
:DISABLED whenever it's not running its top-level loop. The Franz doc
states that :DISOWNED means no frame manager owns it and :DISABLED
means the frame is owned by a frame manager but is not visible.

If the frame is up and visible, its state is :ENABLED. The
documentation states that a :SHRUNK state indicates the frame is
iconified, but in the test below I still got a frame-state of
:ENABLED. Perhaps the :SHRUNK state only exists in mwm?

CLIM-USER(21): (mp:process-run-function "test" #'run-frame-top-level a)
#<MULTIPROCESSING:PROCESS test @ #x120f4ca>
CLIM-USER(22): (frame-state a) ;frame is up and running
:ENABLED
CLIM-USER(23): (frame-state a) ;frame is iconified in twm
:ENABLED

Phil Chu
Internet: pchu@bbn.com


Main Index | Thread Index