[comp.windows.x] How do I alter the MWM window menu through XChangeProperty

evgabb@sdrc.UUCP (Rob Gabbard) (06/06/90)

I'd like to alter the Motif window manager system menu without actually
making any Motif calls in my application. After reading the Motif Programmer's
Guide it seems as if the following code would do it:

	#include <X11//MwmUtil.h>

	Atom mwm_atom;
	PropMwmHints mwm_hints;

	mwm_atom = XInternAtom(display,_XA_MWM_HINTS,False);
	mwm_hints.flags = MWM_HINTS_FUNCTIONS;
	mwm_hints.functions = MWM_FUNC_RESIZE | MWM_FUNC_MOVE | 
			      MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE ;
	XChangeProperty(display,window,_XA_MWM_HINTS,mwm_atom,32,
		PropModeReplace, (unsigned char *)&mwm_hints,
				PROP_MWM_HINTS_ELEMENTS);

I would think the above code (with mwm running of course) would change the
window system menu to exclude the close entry. However, this does nothing.
Any clues ? I am running the HP-supplied mwm under HP-UX 7.0.

-- 

Rob Gabbard (uunet!sdrc!evgabb)  
Technical Development Engineer   
Structural Dynamics Research Corp