Converserely, when the icon is clicked, the icon needs to be hidden on the backgound and the window needs to be restored in its current state (which may be different than the state of the window at the time it was iconified.
Squashed commit of the following:
graphics/: Add checks in all places that I can think to avoid doing something stupid with hidden windows
Improve some naming
Add a new file missing in last commit.
graphics/: Initial, incomplete support for hiding windows.