- if( ![self isZoomed] )
- {
- NSRect zoomRect = [[self screen] frame];
- o_saved_frame = [self frame];
- /* we don't have to take care of the eventual menu bar and dock
- as zoomRect will be cropped automatically by setFrame:display:
- to the right rectangle */
- [self setFrame: zoomRect display: YES animate: YES];
- }
- else
- {
- /* unzoom to the saved_frame if the o_saved_frame coords look sound
- (just in case) */
- if( o_saved_frame.size.width > 0 && o_saved_frame.size.height > 0 )
- [self setFrame: o_saved_frame display: YES animate: YES];
- }