I am trying to switch between multiple SDL2 based apps. This is in framebuffer on Debian, rather than any desktop environment.
I am achieving this by pausing execution of apps using
kill -STOP, and selecting/resuming a focused active app using
After much work the only remaining issue I have relates to the joystick event queues. Even when the apps are halted it seems that some process is filling an events queue for each app, so when they are brought back into focus the backlog of events is there to be processed - with uninteded results!
I assume SDL2 is spawning some worker process that I cannot see using
ps and I have failed to halt. How is this implemented? Is there a way to stop the event queue being filled for specific apps or to flush their queues for them?