At the same time I'm trying to fix several other bugs in my game, I've encountered a particularly perplexing one. I have two game clients using Kryonet to communicate through a server. I'm trying to prevent the need for a standalone server application, so the server is handled by one of the client programs as another thread. However, when this server client loses focus or is minimized, the entire game freezes for all other clients as well. The server, when focused, is able to induce changes which are reflected in the other clients even when they are not focused.
Therefore I think my issue is this: how would I be able to keep this separate thread running even when its window loses focus?
If anyone could help me with this, it'd be greatly appreciated.