Use [NSWindow worksWhenModal]

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4578 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-07-13 05:36:27 +00:00
parent d3e6579cfe
commit 975b25cd98
2 changed files with 24 additions and 6 deletions

View file

@ -1,3 +1,8 @@
Tue Jul 13 6:44:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSApplication.m: In ([-runModalSession:]) pay attention to
([NSWindow worksWhenModal]).
1999-07-12 Michael Hanni <mhanni@sprintmail.com>
* Source/NSMenu.m: added code to convert anything that conforms to

View file

@ -462,10 +462,15 @@ NSApplication *NSApp = nil;
do
{
event = DPSGetEvent(ctxt, NSAnyEventMask, limit, NSDefaultRunLoopMode);
if (event != nil && [event window] == theSession->window)
if (event != nil)
{
DPSPostEvent(ctxt, event, YES);
found = YES;
NSWindow *eventWindow = [event window];
if (eventWindow == theSession->window || [eventWindow worksWhenModal])
{
DPSPostEvent(ctxt, event, YES);
found = YES;
}
}
}
while (found == NO && theSession->runState == NSRunContinuesResponse);
@ -479,10 +484,18 @@ NSApplication *NSApp = nil;
pool = [NSAutoreleasePool new];
event = DPSGetEvent(ctxt, NSAnyEventMask, limit, NSDefaultRunLoopMode);
if (event != nil && [event window] == theSession->window)
if (event != nil)
{
ASSIGN(current_event, event);
found = YES;
NSWindow *eventWindow = [event window];
if (eventWindow == theSession->window || [eventWindow worksWhenModal])
{
ASSIGN(current_event, event);
}
else
{
found = NO;
}
}
else
{