I used EWMH (NET_WM_STATE, NET_WM_STATE_FULLSCREEN) hints in my app, and it works in WindowMaker, but don't work in FVWM. Why?

p.s. also, I tried to use over possible hints like XA_WIN_LAYER or MOTIF_WM_HINTS, but all was in vain.

Code:
#define MWM_HINTS_FUNCTIONS     (1L << 0)
#define MWM_HINTS_DECORATIONS   (1L << 1)
#define MWM_HINTS_INPUT_MODE    (1L << 2)
#define MWM_HINTS_STATUS        (1L << 3)

#define MWM_FUNC_ALL            (1L << 0)
#define MWM_FUNC_RESIZE         (1L << 1)
#define MWM_FUNC_MOVE           (1L << 2)
#define MWM_FUNC_MINIMIZE       (1L << 3)
#define MWM_FUNC_MAXIMIZE       (1L << 4)
#define MWM_FUNC_CLOSE          (1L << 5)

#define MWM_DECOR_ALL           (1L << 0)
#define MWM_DECOR_BORDER        (1L << 1)
#define MWM_DECOR_RESIZEH       (1L << 2)
#define MWM_DECOR_TITLE         (1L << 3)
#define MWM_DECOR_MENU          (1L << 4)
#define MWM_DECOR_MINIMIZE      (1L << 5)
#define MWM_DECOR_MAXIMIZE      (1L << 6)

#define MWM_INPUT_MODELESS 0
#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1
#define MWM_INPUT_SYSTEM_MODAL 2
#define MWM_INPUT_FULL_APPLICATION_MODAL 3
#define MWM_INPUT_APPLICATION_MODAL MWM_INPUT_PRIMARY_APPLICATION_MODAL

#define MWM_TEAROFF_WINDOW      (1L<<0)

typedef struct
{
    long flags;
    long functions;
    long decorations;
    long input_mode;
    long state;
} MotifWmHints;

extern int vo_depthonscreen;
extern int vo_screenwidth;
extern int vo_screenheight;

static MotifWmHints vo_MotifWmHints;
static Atom vo_MotifHints = None;

static Atom XA_NET_WM_STATE;
static Atom XA_NET_WM_STATE_FULLSCREEN;
static Atom XA_WIN_LAYER;

int main(void)
{
    display = XOpenDisplay(NIL);
    assert(display);

#define XA_INIT(x) XA##x = XInternAtom(display, #x, False)

    XA_INIT(_NET_WM_STATE);
    XA_INIT(_NET_WM_STATE_FULLSCREEN);

    unsigned long xswamask = CWBackingStore | CWBorderPixel | CWOverrideRedirect;
    XSetWindowAttributes xswa;

    xswa.background_pixel = 0;
    xswa.border_pixel = 0;
    xswa.backing_store = Always;
    xswa.bit_gravity = StaticGravity;
    xswa.override_redirect = 0;

    window = XCreateWindow(display,
                           DefaultRootWindow(display),
                           (XDisplayWidth (display, DefaultScreen(display))-winDX)>>1, 
                           (XDisplayHeight(display, DefaultScreen(display))-winDY)>>1, 
                           winDX,
                           winDY,
                           0,
                           DefaultDepth(display, DefaultScreen(display)),
                           InputOutput,
                           DefaultVisual(display, DefaultScreen(display)), 
                           xswamask,
                           &xswa);
    
    XSelectInput(display, window, StructureNotifyMask|KeyPressMask|KeyReleaseMask);
    XMapWindow(display, window);

    for(;;)
    {
	    XEvent e;
	    XNextEvent(display, &e);
	    if(e.type == MapNotify) break;
    }
   
    XFlush(display);

    XA_INIT(_WIN_LAYER);

    XClientMessageEvent xcev;

    memset(&xcev, 0, sizeof(xcev));
    xcev.type = ClientMessage;
    xcev.display = display;
    xcev.window = window;
    xcev.message_type = XA_WIN_LAYER;
    xcev.format = 32;
    xcev.data.l[0] = (long)11;
    xcev.data.l[1] = (long)0;

    XSendEvent(display, DefaultRootWindow(display), False, SubstructureNotifyMask,
                   (XEvent *) & xcev);

    XFlush(display);

    XEvent xev;

    xev.xclient.type = ClientMessage;
    xev.xclient.serial = 0;
    xev.xclient.send_event = True;
    xev.xclient.message_type = XInternAtom(display,"_NET_WM_STATE", False);

    xev.xclient.window = window;
    xev.xclient.format = 32;
    xev.xclient.data.l[0] = 2; 
    xev.xclient.data.l[1] = XInternAtom(display,"_NET_WM_STATE_FULLSCREEN", False);
    xev.xclient.data.l[2] = 0;
    xev.xclient.data.l[3] = 0;
    xev.xclient.data.l[4] = 0;

    XSendEvent(display, DefaultRootWindow(display), False,
                    SubstructureRedirectMask | SubstructureNotifyMask,
                    &xev);

    XFlush(display);

    vo_MotifHints = XInternAtom(display, "_MOTIF_WM_HINTS", 0);
    if (vo_MotifHints != None)
    {

        memset(&vo_MotifWmHints, 0, sizeof(MotifWmHints));
        vo_MotifWmHints.flags = MWM_HINTS_DECORATIONS;

        vo_MotifWmHints.decorations = MWM_DECOR_MAXIMIZE;
        
        XChangeProperty(display, window, vo_MotifHints, vo_MotifHints, 32,
                        PropModeReplace,
                        (unsigned char *) &vo_MotifWmHints,
                        4);
    }

    XFlush(display);


    const int scr      = DefaultScreen  (display);
    const int depth    = DefaultDepth   (display, scr);
    Visual   *visual   = DefaultVisual  (display, scr);

    char *pixmap_data = NULL;
    switch (depth) {
    case 32:
    case 24:
        pixmap_data = new char[winDX*winDY*4];
        break;
    case 16:
    case 15:
        pixmap_data = new char[winDX*winDY*2];
        break;
    case 8:
        pixmap_data = new char[winDX*winDY];
        break;
    default:
        break;
    }

    wimage = XCreateImage(display, visual, depth, ZPixmap, 0, pixmap_data, winDX, winDY, 8, 0);
    assert(wimage);

    XDestroyWindow(display, window);
    
    XCloseDisplay(display);

    return 0;
}