CLIM mail archive


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

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

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)
CLIM-USER(22): (frame-state a) ;frame is up and running
CLIM-USER(23): (frame-state a) ;frame is iconified in twm

Phil Chu

Main Index | Thread Index