[comp.windows.x.motif] app-defaults resources

dbeck@flopn2.csc.ti.com (Dave Beck) (05/24/91)

	I am trying to move some application resources from my .Xdefaults
to an app-defaults file, and getting strange results.  Mwm has default
behavior of a mouse 3 click popping up a window menu (usually the default
one with Minimize, Maximize, Close, etc).  I have an application menu
I defined in .mwmrc called SSTop_Menu.  When I have in my .Xdefaults the
line
*SmartShell*windowMenu:   SSTop_Menu
I see my application menu as expected on a mouse 3 click.  But when I
moved the line to $HOME/app-defaults/SmartShell, I get the default
window menu instead.  Now I know it's getting to the app-defaults file
because of other resources I've set there (colors, etc).  I also
tested an arbitrary resource there and used XtGetApplicationResources
to check it.  Mwm sees the file, just won't set the menu correctly.
	My understanding was that resources defaulting looks first
at .Xdefaults, then user app-defaults files, then system app-defaults
files.  I've looked through all the FMs, and as near as I can figure
out the way most mwm resources are through a configFile resource on
the ApplicationShell widget.  It points to a resource file that in most
cases is .mwmrc.  The windowMenu resource doesn't seem to attach directly
to any classes, so I can't do an XtSetArg for it.
	I have tried specifying the windowMenu in .mwmrc as well as in the
app-defaults file.  I've tried Mwm*SmartShell*windowMenu (what the FM says
should work) and other variations with no luck.
	Does anyone know what's happening or have any suggestions?  
This is Motif 1.1, X11R4 on a Sparc 1+.  Please e-mail directly.

Dave Beck

dbeck@flopn2.csc.ti.com
Software Systems & Applications Lab
Texas Instruments

nazgul@alfalfa.com (Kee Hinckley) (05/24/91)

> *SmartShell*windowMenu:   SSTop_Menu
> I see my application menu as expected on a mouse 3 click.  But when I
> moved the line to $HOME/app-defaults/SmartShell, I get the default

The windowMenu resource is an Mwm resource, not an application resource.
Mwm needs to read whatever defaults file it is in.

> cases is .mwmrc.  The windowMenu resource doesn't seem to attach directly
> to any classes, so I can't do an XtSetArg for it.
Again, because it has nothing to do with your application.

Alfalfa Software, Inc.          |       Poste:  The EMail for Unix
nazgul@alfalfa.com              |       Send Anything... Anywhere
617/646-7703 (voice/fax)        |       info@alfalfa.com

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

dbeck@flopn2.csc.ti.com (Dave Beck) (05/24/91)

	I've found out a little more in reference to my post of yesterday:

>	My understanding was that resources defaulting looks first
>at .Xdefaults, then user app-defaults files, then system app-defaults
>files.  I've looked through all the FMs, and as near as I can figure
>out the way most mwm resources are through a configFile resource on
>the ApplicationShell widget.  It points to a resource file that in most
>cases is .mwmrc.  The windowMenu resource doesn't seem to attach directly
>to any classes, so I can't do an XtSetArg for it.
>	I have tried specifying the windowMenu in .mwmrc as well as in the
>app-defaults file.  I've tried Mwm*SmartShell*windowMenu (what the FM says
>should work) and other variations with no luck.

	Certain mwm resources (menu definitions, button bindings) are
looked for in $HOME/.mwmrc (or /usr/lib/X11/system.mwmrc, or some 
file specified in a configFile resource on the ApplicationShell widget).
Others (colors, keyboard focus, etc) are looked for in .Xdefaults, 
a user app-defaults file (usually $HOME/Mwm), and a system app-defaults
file /usr/lib/X11/app-defaults/Mwm.  
	Specifying the windowMenu in $HOME/Mwm worked as expected.  
However, from the documentation I should be able to move this down into
my app-defaults directory (like all other application specific resource
files), and with the environment variables set right it should work.
Although I have set XAPPLRESDIR, XFILESEARCHPATH, and XUSERFILESEARCHPATH
to $HOME/app-defaults, none let me get to $HOME/app-defaults/Mwm.
	What am I missing this time?  I need a better understanding of
how all this works, and Motif's FMs aren't helping much.


Dave Beck

dbeck@flopn2.csc.ti.com
Software Systems & Applications Lab
Texas Instruments

PS:   If I represented TI, would they allow me to look this stupid?