winemac: Remove some duplicated code from -makeKeyAndOrderFront:.

This commit is contained in:
Ken Thomases 2013-08-30 00:00:44 -05:00 committed by Alexandre Julliard
parent 315b39ec8d
commit 4b2f4eb600
1 changed files with 4 additions and 18 deletions

View File

@ -1119,26 +1119,12 @@ - (BOOL) validateMenuItem:(NSMenuItem *)menuItem
/* We don't call this. It's the action method of the items in the Window menu. */ /* We don't call this. It's the action method of the items in the Window menu. */
- (void) makeKeyAndOrderFront:(id)sender - (void) makeKeyAndOrderFront:(id)sender
{ {
WineApplicationController* controller = [WineApplicationController sharedController];
WineWindow* front = [controller frontWineWindow];
BOOL wasVisible = [self isVisible];
if (![self isKeyWindow] && !self.disabled && !self.noActivate) if (![self isKeyWindow] && !self.disabled && !self.noActivate)
[controller windowGotFocus:self]; [[WineApplicationController sharedController] windowGotFocus:self];
if (front && [self level] < [front level]) if ([self isMiniaturized])
[self setLevel:[front level]]; [self deminiaturize:nil];
[self orderFront:nil]; [self orderBelow:nil orAbove:nil activate:NO];
if (!wasVisible && fullscreen && [self isOnActiveSpace])
[controller updateFullscreenWindows];
[controller adjustWindowLevels];
if (pendingMinimize)
{
ignore_windowMiniaturize = TRUE;
[self miniaturize:nil];
pendingMinimize = FALSE;
}
} }
- (void) sendEvent:(NSEvent*)event - (void) sendEvent:(NSEvent*)event