I bet not everyone has the same compositing glitches as I have, but it says something about how the fullscreen mode is achieved (for instance it depends on games, though these days most games do it properly). A way to do it manually is like this:
SDL_SetWindowResizable(fb.window, SDL_FALSE);
SDL_SetWindowBordered(fb.window, SDL_FALSE);
SDL_SetWindowPosition(fb.window, 0, 0);
SDL_SetWindowSize(fb.window, sdl_get_display_dim(0).x, sdl_get_display_dim(0).y);
If you use the screen resolution in the SDL_SetWindowSize() call then it’s as if using SDL_WINDOW_FULLSCREEN_DESKTOP, however if you set a smaller size then you get the proper result, which is a borderless window (but obviously that doesn’t take up the full screen) that doesn’t do any of the glitches mentioned. So there’s definitely something being done when the window dimensions are detected to be those of the screen resolution.