How can I check if a custom window was created on the desktop or not?