SDL - Rendering and window focus

m currently making a simple network game in SDL 2.0 using win sock. I have the client and the server exchanging information about positions of the players.

I run the server and the client both at he same time using 2 different projects.

The problem is that when one of the windows loses focus i.e. i click on the other one, THE RENDERING STOPS.

It is important for me that both windows render the game at all times, even when minimized.

btw. I’m sure that the networking side of the game inst paused because console window keeps showing me information about updates etc. Its only rendering that stops.

-In case you need to see the source code, Im using this as the template. Additionally I have a thread running my client and server.