# Program launched from SDL program is launched behind the SDL program

**URL:** <https://discourse.libsdl.org/t/program-launched-from-sdl-program-is-launched-behind-the-sdl-program/22628>\
**Category:** SDL Development\
**Created:** [June 13, 2017, 11:56am UTC](https://discourse.libsdl.org/t/program-launched-from-sdl-program-is-launched-behind-the-sdl-program/22628 "2017-06-13T11:56:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pieter\_Hulshoff](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/pieter_hulshoff/32/135_2.png) [@Pieter\_Hulshoff](https://discourse.libsdl.org/u/Pieter_Hulshoff)\
**Post date:** [June 13, 2017, 11:56am UTC](https://discourse.libsdl.org/t/program-launched-from-sdl-program-is-launched-behind-the-sdl-program/22628/1 "2017-06-13T11:56:34Z")

</div>

I’m currently trying to use [RetroFE](http://www.retrofe.nl) 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?

---

<div class="post-metadata">

**Author:** ![Pieter\_Hulshoff](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/pieter_hulshoff/32/135_2.png) [@Pieter\_Hulshoff](https://discourse.libsdl.org/u/Pieter_Hulshoff)\
**Post date:** [June 13, 2017, 1:35pm UTC](https://discourse.libsdl.org/t/program-launched-from-sdl-program-is-launched-behind-the-sdl-program/22628/2 "2017-06-13T13:35:28Z")

</div>

It looks like this is the same problem as suffered here: [https://forums.libsdl.org/viewtopic.php?p=42655](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?
