зеркало из 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;
|
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 {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче