From 488541f26e88b30ca704cf7585a6c4ef793ece39 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sun, 18 Mar 2018 21:45:25 +0100 Subject: [PATCH] fixed: click to key window in the background did not bring it forward --- AppKit/CPWindow/CPWindow.j | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index 1b0171c38..c2dd4e19e 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -1983,7 +1983,7 @@ CPTexturedBackgroundWindowMask var theWindow = [anEvent window], selector = type == CPRightMouseDown ? @selector(rightMouseDown:) : @selector(mouseDown:); - if ([theWindow isKeyWindow] || ([theWindow becomesKeyOnlyIfNeeded] && ![_leftMouseDownView needsPanelToBecomeKey])) + if (([[CPApp orderedWindows] objectAtIndex:0] === self && [theWindow isKeyWindow]) || ([theWindow becomesKeyOnlyIfNeeded] && ![_leftMouseDownView needsPanelToBecomeKey])) return [_leftMouseDownView performSelector:selector withObject:anEvent]; else {