mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
winemac: Use window server's window list to find next window to offer focus to.
... rather than our orderedWineWindows array, which is going away.
This commit is contained in:
parent
6d4098ebd3
commit
0d4a26eff5
1 changed files with 14 additions and 1 deletions
|
@ -322,9 +322,21 @@ - (void) windowRejectedFocusEvent:(const macdrv_event*)event
|
|||
{
|
||||
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 @@ - (void) windowRejectedFocusEvent:(const macdrv_event*)event
|
|||
}
|
||||
}
|
||||
triedWindows = nil;
|
||||
[windows release];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue