SDL2 windows being made transient incorrectly in Linux

I have found when creating a window with SDL2 (for an OpenGL context), the window manager considers it a transient window. Running certain programs fixes this (qutebrowser, chrome, something using SFML) while other don’t (firefox, darktable, non-graphical stuff).

I’m not entirely sure this is an SDL2 problem, but I can’t find any other program that has the same problem, and I had the same issue both in dwm and ratpoison, and on NixOS and Arch.

In ratpoison it marks the window as transient by calling XGetTransientForHint(…).

I tried poking around in the SDL2 source, and it seems that in SDL_x11window.c, the function SetWindowBordered(…) sets the property. When it isn’t working it goes through an else that calls X11_XSetTransientForHint(…), but after running certain other programs it instead makes it in the main part of the if:

Atom WM_HINTS = X11_XInternAtom(display, “_MOTIF_WM_HINTS”, True);
if (WM_HINTS != None) { …/*working*/}else{…/*broken*/}

I suppose the other programs change X’s state in some way to change this call? Are the window managers not handling something correctly?