Skip to content

Instantly share code, notes, and snippets.

@bpaf
Created February 18, 2011 18:39
Show Gist options
  • Save bpaf/834168 to your computer and use it in GitHub Desktop.
Save bpaf/834168 to your computer and use it in GitHub Desktop.
doesn't check for visibility before centering
- (void)runModalSession:(CPModalSession)aModalSession
{
aModalSession._previous = _currentSession;
_currentSession = aModalSession;
var theWindow = aModalSession._window;
[theWindow center];
[theWindow makeKeyWindow];
[theWindow orderFront:self];
// [theWindow._bridge _obscureWindowsBelowModalWindow];
[CPApp setCallback:_CPRunModalLoop forNextEventMatchingMask:CPAnyEventMask untilDate:nil inMode:0 dequeue:NO];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment