winemac.drv: Allow cycling of windows with Cmd+`.

We already set up the Window menu and set the relevant bits in
collectionBehavior, but windows must respond YES to
-canBecomeKeyWindow in order to actually be activated by Cmd+`
window cycling.

Signed-off-by: Tim Clem <tclem@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Tim Clem 2021-09-09 15:31:56 -07:00 committed by Alexandre Julliard
parent 94e0d4b525
commit b5deeff860
1 changed files with 5 additions and 1 deletions

View File

@ -2358,7 +2358,11 @@ - (BOOL) canBecomeKeyWindow
{
if (causing_becomeKeyWindow == self) return YES;
if (self.disabled || self.noActivate) return NO;
return [self isKeyWindow];
if ([self isKeyWindow]) return YES;
// If a window's collectionBehavior says it participates in cycling,
// it must return YES from this method to actually be eligible.
return ![self isExcludedFromWindowsMenu];
}
- (BOOL) canBecomeMainWindow