Program launched from SDL program is launched behind the SDL program

I’m currently trying to use RetroFE on my retropie setup. Compiling and running is no problem, but whenever I launch an emulator it continues to show the (inactive) front-end. The (active) emulator is not shown, though sound works normal, and all input is sent to the emulator. I’ve had similar issues on my PC when running RetroFE in full-screen mode, and since retropie launches RetroFE using the framebuffer I assume that I’m facing a similar problem. Trying to minimize or hide the window doesn’t have any impact.

Is the only solution here to break down the SDL layers (destroy all textures, the renderer, and the window) or is there a better alternative?

It looks like this is the same problem as suffered here: https://forums.libsdl.org/viewtopic.php?p=42655
One of the replies mentions a layering system; would that be a solution, and if so: how could I apply this?