зеркало из https://github.com/github/Rebel.git
Also use windowNumberAtPoint: to test if we're in the popoverWindow.
This commit is contained in:
Родитель
3e101d2aab
Коммит
196d94e221
|
@ -332,7 +332,7 @@ static CGFloat RBLRectsGetMedianY(CGRect r1, CGRect r2) {
|
|||
RBLPopover *strongSelf = weakSelf;
|
||||
if (strongSelf.popoverWindow == nil) return;
|
||||
BOOL shouldClose = NO;
|
||||
BOOL mouseInPopoverWindow = NSPointInRect(NSEvent.mouseLocation, strongSelf.popoverWindow.frame);
|
||||
BOOL mouseInPopoverWindow = ([NSWindow windowNumberAtPoint:NSEvent.mouseLocation belowWindowWithWindowNumber:0] == strongSelf.popoverWindow.windowNumber);
|
||||
if (strongSelf.behavior == RBLPopoverBehaviorTransient) {
|
||||
shouldClose = !mouseInPopoverWindow;
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче