Parent document is top of "Motif FAQ (Part 3 of 9)"
Previous document is "69) How can I put decorations on transient windows using olwm?"
Next document is "71) How can I create a multi-colored window manager icon?"

70) How can I turn off the Motif window manager functions from the

system menu?
[Last modified: October 92]

Answer:  The user of an application can control functions in the system menu
for an application using the mwm resource clientFunctions:

        mwm.application_name.clientFunctions: -resize -close

Note that mwm will have to be restarted after putting this in their resource
database.


Answer:  The writer of an application can only remove items.  Be warned that
your users will probably gnash their teeth, swear furiously at your product
and stop using it if they discover that you have done this.  (Especially if
you have removed the Close button, your application has hung and it has taken
up all of memory and swap so it can't be killed.)  Much better is to catch the
action gracefully as in the next question.

        #include <Xm/MwmUtil.h>

        XtVaGetValues(shell, XmNmwmFunctions, &int_val, NULL);
        int_val &= ~(MWM_FUNC_CLOSE | MWM_FUNC_ALL);
        XtVaSetValues(shell, XmNmwmFunctions, int_val, NULL);

Parent document is top of "Motif FAQ (Part 3 of 9)"
Previous document is "69) How can I put decorations on transient windows using olwm?"
Next document is "71) How can I create a multi-colored window manager icon?"