You're the first user to request it in 5 years, and only to implement a workaround for the lack of real threads in Python...
Just to make it clear, I managed to create a thread in Python, but I was having trouble to understand how to use
sf::Window::SetActive (bool). I read the docs which state:
A window is active only on the current thread, if you want to make it active on another thread you have to deactivate it on the previous thread first if it was active. Only one window can be active on a thread at a time, thus the window previously active (if any) automatically gets deactivated.
Could you explain how to use the SetActive method? Is there a sample code somewhere that I could refer to (even in C++)? If I check the window input in the main loop and display the window in a thread, when should I call the setactive(false) and when the setactive(true). I mean, since the thread and the main loop run alternately, how to tell which thread should be the active one?
Also, I had to set the Window as global to be able to use it in the thread. Can the window object be passed somehow to the thread so that it's shared between the main loop and the thread? Again, can I find a code snippet in C++ somewhere that would demonstrate how sf:window and sf:thread can work together?
Thanks in advance for your help!