SFML community forums

Help => Window => Topic started by: EvgenyPin on May 04, 2019, 05:57:56 am

Title: When you move the window, the program stops.
Post by: EvgenyPin on May 04, 2019, 05:57:56 am
When you move the window, the program stops. How to make the program work normally when moving the window?
Title: Re: When you move the window, the program stops.
Post by: Hapax on May 04, 2019, 05:01:49 pm
This is possible although not directly from within SFML.
You will need to be in control of the window directly, whether that be OS-specific or using a library and then apply SFML inside that window.
Using more advanced window controls, you can refresh the window when receiving messages from the operating system that the window has moved rather than waiting for the window to have finished moving or resizing.
Title: Re: When you move the window, the program stops.
Post by: EvgenyPin on May 04, 2019, 07:58:32 pm
Can you elaborate on how to do this? Or where you can see how to do it?
Title: Re: When you move the window, the program stops.
Post by: eXpl0it3r on May 05, 2019, 06:37:45 pm
You can handle the events in a separate thread, that way the event queue won't block the rendering.

Personally, I wouldn't really bother with "fixing" this and instead just make sure that once the rendering and logic update resumes, that you discard the long "frametime".