Multithreaded test case

Quick and dirty test case for multiple windows and multiple threads.

Work in progress. Proper error handling missing.