Commit 0d4a26ef authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

winemac: Use window server's window list to find next window to offer focus to.

... rather than our orderedWineWindows array, which is going away.
parent 6d4098eb
......@@ -322,9 +322,21 @@ int macdrv_err_on;
{
if (event->window_got_focus.serial == windowFocusSerial)
{
NSMutableArray* windows = [keyWindows mutableCopy];
NSNumber* windowNumber;
WineWindow* window;
for (windowNumber in [NSWindow windowNumbersWithOptions:NSWindowNumberListAllSpaces])
{
window = (WineWindow*)[NSApp windowWithWindowNumber:[windowNumber integerValue]];
if ([window isKindOfClass:[WineWindow class]] && [window screen] &&
![windows containsObject:window])
[windows addObject:window];
}
triedWindows = (NSMutableSet*)event->window_got_focus.tried_windows;
[triedWindows addObject:(WineWindow*)event->window];
for (NSWindow* window in [keyWindows arrayByAddingObjectsFromArray:[self orderedWineWindows]])
for (window in windows)
{
if (![triedWindows containsObject:window] && [window canBecomeKeyWindow])
{
......@@ -333,6 +345,7 @@ int macdrv_err_on;
}
}
triedWindows = nil;
[windows release];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment