If you intend to run your application from Mwm
, you can achieve the desired behavior by setting (e.g. via XtVaAppInitialize()
) the following X11 resources:
! Title bar buttons
Mwm*YourApplicationClassHere.clientDecoration: -minimize -maximize
! Window menu functions
Mwm*YourApplicationClassHere.clientFunctions: -minimize -maximize
These resources are explained in more detail here and here.
Speaking of window menu, this one depends on a specific window manager in use. Mwm
, for instance, allows the client to set the menu name using Mwm*YourApplicationClassHere.windowMenu
resource, the menu itself must be defined in either ${HOME}/.mwmrc
or global mwmrc
, or XmNmwmMenu
resource of VendorShell
. The resulting custom window menu is exposed as a _MOTIF_WM_MENU
atom, which seems to be ignored by modern window managers.
Sample mwmrc
menu definitions may look like this
Menu CustomMenu0
{
Restore _R Alt<Key>F5 f.restore
Move _M Alt<Key>F7 f.move
Size _S Alt<Key>F8 f.resize
Minimize _n Alt<Key>F9 f.minimize
Maximize _x Alt<Key>F10 f.maximize
Lower _L Alt<Key>F3 f.lower
no-label f.separator
Pass\ Keys _K f.pass_keys
no-label f.separator
Close _C Alt<Key>F4 f.kill
}
Menu CustomMenu1
{
Your\ Application\ Name\ Here f.title
no-label f.separator
Close _C Alt<Key>F4 f.kill
}
(see the function descriptions). Custom menu items can be added using f.send_msg
(examples here and here).
I'm pretty sure all of the above also applies to Dtwm
(CDE).