The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL2 + Raspberry Pi: Clearing the framebuffer
Kibster


Joined: 12 Mar 2014
Posts: 1
Location: United States
I am writing an SDL2 app using the framebuffer which calls another app which also uses the framebuffer. I am currently simply calling the other app (omxplayer) via the system() command as a proof-of-concept.

My problem is that my window seems to stay on top of the called app. I have tried SDL_HideWindow() as well as a whole host of other options (such as making the window size 0x0). The only thing I have been able to make work is to start to called app with popen() or inside a thread and then destroy my SDL instance. This is not preferable as I will be taking control back and do not want to have to re-create my window and renderer. Does anyone know of a solution?
SDL2 + Raspberry Pi: Clearing the framebuffer
Jonny D


Joined: 12 Sep 2009
Posts: 932
Perhaps this?
https://wiki.libsdl.org/SDL_RaiseWindow



Jonny D
SDL2 + Raspberry Pi: Clearing the framebuffer
gabomdq


Joined: 28 Jul 2011
Posts: 495
Location: Argentina
2014-03-16 4:30 GMT-03:00 Kibster:
Quote:
I am writing an SDL2 app using the framebuffer which calls another app which also uses the framebuffer. I am currently simply calling the other app (omxplayer) via the system() command as a proof-of-concept.

My problem is that my window seems to stay on top of the called app. I have tried SDL_HideWindow() as well as a whole host of other options (such as making the window size 0x0). The only thing I have been able to make work is to start to called app with popen() or inside a thread and then destroy my SDL instance. This is not preferable as I will be taking control back and do not want to have to re-create my window and renderer. Does anyone know of a solution?






None of the window show/hide/resize related functions are implemented on the RPi backend: http://hg.libsdl.org/SDL/file/b558f99d48f0/src/video/raspberry/SDL_rpivideo.c#l322


It's basically designed to run as a single full screen window. That said, the board has a layering system built in, if you display your stuff on a layer with a higher level than what SDL uses (10000 for the window, 10001 for the mouse pointer), you'll occlude the SDL window.




--
Gabriel.