Also use windowNumberAtPoint: to test if we're in the popoverWindow.

This commit is contained in:
Alan Rogers 2014-08-07 18:33:35 +10:00
Родитель 3e101d2aab
Коммит 196d94e221
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -332,7 +332,7 @@ static CGFloat RBLRectsGetMedianY(CGRect r1, CGRect r2) {
RBLPopover *strongSelf = weakSelf; RBLPopover *strongSelf = weakSelf;
if (strongSelf.popoverWindow == nil) return; if (strongSelf.popoverWindow == nil) return;
BOOL shouldClose = NO; 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) { if (strongSelf.behavior == RBLPopoverBehaviorTransient) {
shouldClose = !mouseInPopoverWindow; shouldClose = !mouseInPopoverWindow;
} else { } else {