Dynamically hiding and showing the Dock icon depending on whether there’s a window open ensures the app places nicely with the task switcher.