Skip to content

Instantly share code, notes, and snippets.

@jnicholls
Created November 1, 2012 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnicholls/3995702 to your computer and use it in GitHub Desktop.
Save jnicholls/3995702 to your computer and use it in GitHub Desktop.
(void)windowDidResize:(NSNotification*)notification {
if (!shell_->window_state->ignore_changes) {
NSWindow* window = [notification object];
shell_->window_state->last_frame = window.frame;
if (shell_->window_state->state != Ion::IonUI::Window::STATE_HIDDEN) {
if (window.isZoomed && shell_->window_state->type == Ion::IonUI::Window::TYPE_NORMAL)
shell_->window_state->state = Ion::IonUI::Window::STATE_MAXIMIZED;
else
shell_->window_state->state = Ion::IonUI::Window::STATE_NORMAL;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment