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.cu...@free.fr>
---
 src/motif.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/src/motif.c b/src/motif.c
index 5fca916..f069462 100644
--- a/src/motif.c
+++ b/src/motif.c
@@ -92,6 +92,14 @@ static void setupMWMHints(WWindow *wwin, MWMHints *mwm_hints)
                        WSETUFLAG(wwin, no_resizable, 0);
                }
 
+               if (mwm_hints->decorations & MWM_DECOR_BORDER) {
+                       /*
+                        * WindowMaker does not draw extra border around the 
window
+                        * like many other X window managers, so we don't need 
to
+                        * hide anything for this flag
+                        */
+               }
+
                if (mwm_hints->decorations & MWM_DECOR_RESIZEH)
                        WSETUFLAG(wwin, no_resizebar, 0);
 
@@ -101,10 +109,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 button on the 
title.
+                        * 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 +144,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);
 
-- 
2.1.3


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to