1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 05:48:01 +01:00

wmaker: add code to explicitly ignore Motif-WM flags we don't want to handle

The goal is to explain the reason why we don't do anything about them, so
people looking at the code in the future will know why it is this way. The
expected side effect is also to silent warnings [-Wunused-macros] from gcc.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-12-08 22:42:39 +01:00
committed by Carlos R. Mafra
parent 7ce2636f63
commit b5e89127ca

View File

@@ -92,6 +92,16 @@ static void setupMWMHints(WWindow *wwin, MWMHints *mwm_hints)
WSETUFLAG(wwin, no_resizable, 0);
}
if (mwm_hints->decorations & MWM_DECOR_BORDER) {
/*
* WindowMaker is drawing only a discreet 1 pixel border without
* any decoration like a few other X window managers used to do, so
* we assume it is not worth spending the time to add extra
* complexity to handle this special request, considering also that
* the Motif toolkit is not used anymore nowadays.
*/
}
if (mwm_hints->decorations & MWM_DECOR_RESIZEH)
WSETUFLAG(wwin, no_resizebar, 0);
@@ -101,10 +111,26 @@ static void setupMWMHints(WWindow *wwin, MWMHints *mwm_hints)
WSETUFLAG(wwin, no_closable, 0);
}
if (mwm_hints->decorations * MWM_DECOR_MENU) {
/*
* WindowMaker does not include a button to display the menu
* for windows, this is done using right mouse button on the
* title bar. As a consequence, we ignore this flag because we
* have nothing to hide.
*/
}
if (mwm_hints->decorations & MWM_DECOR_MINIMIZE) {
WSETUFLAG(wwin, no_miniaturize_button, 0);
WSETUFLAG(wwin, no_miniaturizable, 0);
}
if (mwm_hints->decorations & MWM_DECOR_MAXIMIZE) {
/*
* WindowMaker does not display a button to maximize windows,
* so we don't need to hide anything more for that flag
*/
}
}
if (mwm_hints->flags & MWM_HINTS_FUNCTIONS) {
@@ -120,6 +146,13 @@ static void setupMWMHints(WWindow *wwin, MWMHints *mwm_hints)
if (mwm_hints->functions & MWM_FUNC_RESIZE)
WSETUFLAG(wwin, no_resizable, 0);
if (mwm_hints->functions & MWM_FUNC_MOVE) {
/*
* WindowMaker does not allow a window to not be moved, and this
* is a good thing, so we explicitly ignore this flag.
*/
}
if (mwm_hints->functions & MWM_FUNC_MINIMIZE)
WSETUFLAG(wwin, no_miniaturizable, 0);