mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 21:00:47 +00:00
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:
parent
8c6c6c5363
commit
5e34b5264a
2 changed files with 24 additions and 6 deletions
|
@ -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>
|
1999-07-12 Michael Hanni <mhanni@sprintmail.com>
|
||||||
|
|
||||||
* Source/NSMenu.m: added code to convert anything that conforms to
|
* Source/NSMenu.m: added code to convert anything that conforms to
|
||||||
|
|
|
@ -462,10 +462,15 @@ NSApplication *NSApp = nil;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
event = DPSGetEvent(ctxt, NSAnyEventMask, limit, NSDefaultRunLoopMode);
|
event = DPSGetEvent(ctxt, NSAnyEventMask, limit, NSDefaultRunLoopMode);
|
||||||
if (event != nil && [event window] == theSession->window)
|
if (event != nil)
|
||||||
{
|
{
|
||||||
DPSPostEvent(ctxt, event, YES);
|
NSWindow *eventWindow = [event window];
|
||||||
found = YES;
|
|
||||||
|
if (eventWindow == theSession->window || [eventWindow worksWhenModal])
|
||||||
|
{
|
||||||
|
DPSPostEvent(ctxt, event, YES);
|
||||||
|
found = YES;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (found == NO && theSession->runState == NSRunContinuesResponse);
|
while (found == NO && theSession->runState == NSRunContinuesResponse);
|
||||||
|
@ -479,10 +484,18 @@ NSApplication *NSApp = nil;
|
||||||
pool = [NSAutoreleasePool new];
|
pool = [NSAutoreleasePool new];
|
||||||
|
|
||||||
event = DPSGetEvent(ctxt, NSAnyEventMask, limit, NSDefaultRunLoopMode);
|
event = DPSGetEvent(ctxt, NSAnyEventMask, limit, NSDefaultRunLoopMode);
|
||||||
if (event != nil && [event window] == theSession->window)
|
if (event != nil)
|
||||||
{
|
{
|
||||||
ASSIGN(current_event, event);
|
NSWindow *eventWindow = [event window];
|
||||||
found = YES;
|
|
||||||
|
if (eventWindow == theSession->window || [eventWindow worksWhenModal])
|
||||||
|
{
|
||||||
|
ASSIGN(current_event, event);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
found = NO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue