winemac: Clear the latentDisplayModes instance variable before realizing the latent modes.

This commit is contained in:
Ken Thomases 2014-01-10 03:11:31 -06:00 committed by Alexandre Julliard
parent 42a7d7209b
commit d4d92a759e
1 changed files with 4 additions and 3 deletions

View File

@ -2080,13 +2080,14 @@ - (void) unminimizeWindowIfNoneVisible
- (void)applicationDidBecomeActive:(NSNotification *)notification
{
NSNumber* displayID;
NSDictionary* modesToRealize = [latentDisplayModes autorelease];
for (displayID in latentDisplayModes)
latentDisplayModes = [[NSMutableDictionary alloc] init];
for (displayID in modesToRealize)
{
CGDisplayModeRef mode = (CGDisplayModeRef)[latentDisplayModes objectForKey:displayID];
CGDisplayModeRef mode = (CGDisplayModeRef)[modesToRealize objectForKey:displayID];
[self setMode:mode forDisplay:[displayID unsignedIntValue]];
}
[latentDisplayModes removeAllObjects];
[self updateCursorClippingState];