[comp.sys.sun] need help with catching L7 frame open/close

billr@saab.cna.tek.com (Bill Randle) (03/31/89)

I'm writing a SunView application program that needs to know when the
frame is being opened or closed in order to do some specific processing.
I know about interposers and have a 'notify_interpose_event_func' function
that looks at the current closed status, lets the event happen then checks
again per the example in the SunView manual.  This works just fine when I
close the frame from the frame menu.  When the interposition function is
called the frame state is open, then next state is closed so I can do the
frame closing processing.

The problem comes in when I close with the L7 key.  When the interposer is
called the frame is already closed!  I tried explicitly looking for L7 in
the list of events that my canvas looks for and can detect that L7 was hit
and do my special processing.  However, when L7 is hit while the cursor is
in the control panel, the routine is not called (even though I set
PANEL_BACKGROUND_PROC).

Does anyone have any ideas?  Why isn't the interposer routine called
before the frame is closed with L7, like it is with the frame menu?

	-Bill Randle
	Tektronix, Inc.
	billr@saab.CNA.TEK.COM

chuck@trantor.harris-atd.com (Chuck Musciano) (04/22/89)

As you said, you can use the interposer to catch open/close transitions on
your frame.  You must also install the interposer on every panel in your
application, too.  Don't ask me why, but the panel will catch and handle
L7 without passing it to the frame.  So I always interpose on the base
frame and all the panels, and that solves the problem.  The
PANEL_BACKGROUND_PROC does not seem to do the trick; you must interpose
the panel.

Chuck Musciano			ARPA  : chuck@trantor.harris-atd.com
Harris Corporation 		Usenet: ...!uunet!x102a!trantor!chuck
PO Box 37, MS 3A/1912		AT&T  : (407) 727-6131
Melbourne, FL 32902		FAX   : (407) 727-{5118,5227,4004}