SDL_HideWindow and SDL_ShowWindow under wayland

Here is a simple test app, creating a window and hiding it when key UP is pressed. It works as expected on Linux/X11, but on Linux/Wayland the window does not disappear. Checked on latest hg version too.

Similarly, a real-life app starting with the window hidden, and calling SDL_ShowWindow() on a specific event will never show the window.

What can be the cause ? Is Wayland support complete yet ?

#include "SDL.h"
#include <stdio.h>

int main()
{
    SDL_Window *window = NULL;
    SDL_Renderer *renderer = NULL;
    SDL_bool error = SDL_TRUE;

    if (SDL_Init(SDL_INIT_VIDEO) < 0) {
        goto exit;
    }
    if (SDL_CreateWindowAndRenderer(640, 480, 0, &window, &renderer) < 0) {
        goto exit;
    }
    SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);
    SDL_DisableScreenSaver();

    while (SDL_TRUE) {
        SDL_Event event;
        while (SDL_PollEvent(&event)) {
            printf("event %d\n", event.type);
            switch (event.type) {
            case SDL_KEYUP:
                printf("key up\n");
                SDL_HideWindow(window);
                break;
            case SDL_MOUSEBUTTONUP:
            case SDL_QUIT:
                error = SDL_FALSE;
                goto exit;
            }
        }
        SDL_RenderClear(renderer);
        SDL_RenderPresent(renderer);
    }

exit:
    if (error) {
        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s", SDL_GetError());
    }
    if (renderer) {
        SDL_DestroyRenderer(renderer);
    }
    if (window) {
        SDL_DestroyWindow(window);
    }
    SDL_Quit();
    return error;
}