Added resize handler to track system maximize/unmaximize commands,
better handling of unmaximize when not maximized on current image