[comp.windows.x] Xt Shell widgets and twm

dsr@ncc1.mitre.org (Douglas S Rand) (02/07/90)

I've noticed that Cascade menu's aren't give a title bar or window dressing
by twm.  Now what I want to know:  what do you have to do to a popup shell
widget to get this behavior?  My popup shells come up (in XtPopup()) with
full window dressing and a name of "NoName".  Argggggh.  I've searched through
some of Shell.c and I'm confused.  Help.

Cheers,
Doug <dsrand@mitre.org>
--
Douglas S. Rand 
Internet:   <dsrand@mitre.org>
Snail:	    MITRE, Burlington Road, Bedford, MA 
Disclaimer: MITRE might agree with me - then again...

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (02/22/90)

> I've noticed that Cascade menu's aren't give a title bar or window dressing
> by twm.  Now what I want to know:  what do you have to do to a popup shell
> widget to get this behavior?  My popup shells come up (in XtPopup()) with
> full window dressing and a name of "NoName".  Argggggh.  I've searched through
> some of Shell.c and I'm confused.  Help.

The class of the popup shell determines how the window manager interacts with it.
There are four different types of shells that application can typically use:

Override shell -	Creates a window that is ignored by the window manger
			this should not be used unless you are grabbing the
			pointer, such as a popup menu, since this window 
			cannot be operated on by the window manager.

Transient shell -	Should be used for short duration windows that do
			no grab the pointer.  These are usually used
			for things like dialog boxes.

Application shell -	Used for the first window created by the application 
			on this display.  A session manager uses the information
			provided by this window to restart the application.

TopLevel shell	-	Used for long term application windows in addition to
			the original one, session managers ignore this window.

Application Shells, and TopLevel Shells are usually fully decorated, and
the window manager askes the user for placement.

Transiet Shells are usually placed where the application specifies, and
may or may not be decorated.  In twm this is a configuration option
(DecorateTransients).  

Override Shells cannot be decorated, and generally cannot be operated on
by the window manager.

The long and short of it is that you cannot be sure whether or not window
decorations will apprear, it is (and should be) the users decision, just use
the type of shell that is appropriate for the task that you are preforming, and
hope that the window manger is smart enough to do the "right" thing.


						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213