Small fixes.

Fix focused child index when bringing window to front.
Added maximize/restore/close Window events.
Improved ToggleButton state and event handling.
Added window to main demo.