Fix bug #27613. After closing the print option panel via the close

button the application was no longer reacting.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28788 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2009-10-10 13:56:45 +00:00
parent 2be2de6735
commit 18efe486cc
3 changed files with 31 additions and 3 deletions

View file

@ -1635,6 +1635,27 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
[theSession->window setLevel: theSession->entryLevel];
}
NSZoneFree(NSDefaultMallocZone(), theSession);
// Bring the next modal window to front
if ((_session != 0) &&
([windows indexOfObjectIdenticalTo: _session->window] != NSNotFound))
{
NSWindow *theWindow = _session->window;
// Same code as in beginModalSessionForWindow:
[theWindow orderFrontRegardless];
if ([self isActive] == YES)
{
if ([theWindow canBecomeKeyWindow] == YES)
{
[theWindow makeKeyWindow];
}
else if ([theWindow canBecomeMainWindow] == YES)
{
[theWindow makeMainWindow];
}
}
}
}
/**
@ -1786,8 +1807,8 @@ See Also: -runModalForWindow:
/*
* Check to see if the window has gone away - if so, end session.
*/
if ([[self windows] indexOfObjectIdenticalTo: _session->window] ==
NSNotFound)
if ([[self windows] indexOfObjectIdenticalTo: _session->window] == NSNotFound
|| ![_session->window isVisible])
{
[self stopModal];
}