fixed 100% CPU when PeekMessage() returns window messages, when it only should return thread messages