mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Better modal window handling
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12183 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e0a599f836
commit
3c049f1896
3 changed files with 33 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2002-01-21 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/NSApplication.m (-deactivate): Don't hide modal windows.
|
||||
(-runModalSession:): Handle WM events (like resize) for any window
|
||||
right away.
|
||||
|
||||
2002-01-21 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/Appkit/NSGraphicsContext.h: new method to slide image
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
<p>
|
||||
A string containing the name of the backend bundle to use
|
||||
for display specific GUI handling. The default is
|
||||
"libgnustep-xgps.bundle". Currently the only other choice is
|
||||
"libgnustep-xdps.bundle".
|
||||
"libgnustep-xgps". Currently the only other choice is
|
||||
"libgnustep-xdps".
|
||||
</p>
|
||||
</desc>
|
||||
<term>GSBrowserCellFontify</term>
|
||||
|
|
|
@ -825,6 +825,7 @@ static NSCell* tileCell = nil;
|
|||
}
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
NSModalSession theSession;
|
||||
NSWindow *win = [windows_list objectAtIndex: i];
|
||||
|
||||
if ([win isVisible] == NO)
|
||||
|
@ -835,6 +836,17 @@ static NSCell* tileCell = nil;
|
|||
{
|
||||
continue; /* can't hide the app icon. */
|
||||
}
|
||||
/* Don't order out modal windows */
|
||||
theSession = _session;
|
||||
while (theSession != 0)
|
||||
{
|
||||
if (win == theSession->window)
|
||||
break;
|
||||
theSession = theSession->previous;
|
||||
}
|
||||
if (theSession)
|
||||
continue;
|
||||
|
||||
if ([win hidesOnDeactivate] == YES)
|
||||
{
|
||||
[_inactive addObject: win];
|
||||
|
@ -1108,6 +1120,11 @@ See Also: -runModalForWindow:
|
|||
DPSPostEvent(ctxt, event, YES);
|
||||
found = YES;
|
||||
}
|
||||
else if ([event type] == NSAppKitDefined)
|
||||
{
|
||||
/* Handle resize and other window manager events now */
|
||||
[self sendEvent: event];
|
||||
}
|
||||
}
|
||||
}
|
||||
while (found == NO && theSession->runState == NSRunContinuesResponse);
|
||||
|
@ -1313,9 +1330,14 @@ See -runModalForWindow:
|
|||
|
||||
if (!theEvent)
|
||||
NSDebugLLog(@"NSEvent", @"NSEvent is nil!\n");
|
||||
NSDebugLLog(@"NSEvent", @"Send NSEvent type: %d to window %@",
|
||||
type, ((window != nil) ? [window description]
|
||||
: @"No window"));
|
||||
if (type == NSMouseMoved)
|
||||
NSDebugLLog(@"NSMotionEvent", @"Send move (%d) to window %@",
|
||||
type, ((window != nil) ? [window description]
|
||||
: @"No window"));
|
||||
else
|
||||
NSDebugLLog(@"NSEvent", @"Send NSEvent type: %d to window %@",
|
||||
type, ((window != nil) ? [window description]
|
||||
: @"No window"));
|
||||
if (window)
|
||||
[window sendEvent: theEvent];
|
||||
else if (type == NSRightMouseDown)
|
||||
|
|
Loading…
Reference in a new issue