mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 00:50:38 +00:00
* Headers/AppKit/NSGraphics.h: Add GSOrderedWindows function.
* Source/NSApplication.m (NSAppIconView -mouseDown:): Use GSOrderedWindows. (NSApplication -deactivate): Ditto. (-hide:): Ditto. (-unhideWithoutActivation:): Ditto. (-makeWindowsPerform:inOrder): Ditto. (-orderedWindows:): Ditto. (-windowWillClose:): Ditto. * Source/GSDisplayServer.m: Implement -windowlist. * Source/NSWindow.m (NSCountWindowList,NSWindowList): Use -windowlist. (GSOrderedWindows): Initial implementation. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23936 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1658cb1dee
commit
a197607128
5 changed files with 122 additions and 56 deletions
|
@ -33,6 +33,7 @@
|
|||
#include <Foundation/NSThread.h>
|
||||
#include <Foundation/NSGeometry.h>
|
||||
|
||||
#include "AppKit/NSApplication.h"
|
||||
#include "AppKit/NSEvent.h"
|
||||
#include "AppKit/NSImage.h"
|
||||
#include "AppKit/NSWindow.h"
|
||||
|
@ -664,11 +665,25 @@ GSCurrentServer(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/** Returns the list of windows that the server controls */
|
||||
/** Backends can override this method to return an array of window numbers
|
||||
ordered front to back. The front most window being the first object
|
||||
in the array.
|
||||
The default implementation returns the visible windows in an
|
||||
unspecified order.
|
||||
*/
|
||||
- (NSArray *) windowlist
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
return nil;
|
||||
NSMutableArray *list = [NSMutableArray arrayWithArray:[NSApp windows]];
|
||||
int c = [list count];
|
||||
|
||||
while (c-- > 0)
|
||||
{
|
||||
if (![[list objectAtIndex:c] isVisible])
|
||||
{
|
||||
[list removeObjectAtIndex:c];
|
||||
}
|
||||
}
|
||||
return [list valueForKey:@"windowNumber"];
|
||||
}
|
||||
|
||||
/** Returns the depth of the window */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue