the solution is adding a thread to process window events (if the library supports WindowEvents inside Threads) or adding the core (Render) of AppGameKit in a thread isolated from window events...
The problem is " how to do it in an uncomplicated way " xD