Module: wine
Branch: master
Commit: b5deeff860339c214e48f411bda94e456abf03a9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b5deeff860339c214e48f411…
Author: Tim Clem <tclem(a)codeweavers.com>
Date: Thu Sep 9 15:31:56 2021 -0700
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(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
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 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
{
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