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 --- I tested to make sure this doesn't change keyboard events, and it doesn't. Cocoa consumes Cmd+` early, so Windows apps already weren't getting any keypresses related to it.
All other window focus behavior is unchanged by this patch, since the disabled and noActivate checks remain in place and take priority.
dlls/winemac.drv/cocoa_window.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 0926756c875..80cb2693409 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -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