forked from mirrors/gecko-dev
Bug 1846205 - Use key state change to send activate/deactivate event when a modal window is opened; r=spohl,mac-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D186211
This commit is contained in:
parent
f484fbf7d6
commit
467c95c408
1 changed files with 7 additions and 7 deletions
|
|
@ -235,7 +235,7 @@
|
||||||
id delegate = [window delegate];
|
id delegate = [window delegate];
|
||||||
if (!delegate || ![delegate isKindOfClass:[WindowDelegate class]]) {
|
if (!delegate || ![delegate isKindOfClass:[WindowDelegate class]]) {
|
||||||
[TopLevelWindowData activateInWindowViews:window];
|
[TopLevelWindowData activateInWindowViews:window];
|
||||||
} else if ([window isSheet]) {
|
} else if ([window isSheet] || [NSApp modalWindow]) {
|
||||||
[TopLevelWindowData activateInWindow:window];
|
[TopLevelWindowData activateInWindow:window];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -246,7 +246,7 @@
|
||||||
id delegate = [window delegate];
|
id delegate = [window delegate];
|
||||||
if (!delegate || ![delegate isKindOfClass:[WindowDelegate class]]) {
|
if (!delegate || ![delegate isKindOfClass:[WindowDelegate class]]) {
|
||||||
[TopLevelWindowData deactivateInWindowViews:window];
|
[TopLevelWindowData deactivateInWindowViews:window];
|
||||||
} else if ([window isSheet]) {
|
} else if ([window isSheet] || [NSApp modalWindow]) {
|
||||||
[TopLevelWindowData deactivateInWindow:window];
|
[TopLevelWindowData deactivateInWindow:window];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -258,11 +258,11 @@
|
||||||
NSWindow* window = (NSWindow*)[inNotification object];
|
NSWindow* window = (NSWindow*)[inNotification object];
|
||||||
|
|
||||||
id delegate = [window delegate];
|
id delegate = [window delegate];
|
||||||
// Don't send events to a top-level window that has a sheet open above it --
|
// Don't send events to a top-level window that has a sheet/modal-window open
|
||||||
// as far as Gecko is concerned, it's inactive, and stays so until the sheet
|
// above it -- as far as Gecko is concerned, it's inactive, and stays so until
|
||||||
// closes.
|
// the sheet/modal-window closes.
|
||||||
if (delegate && [delegate isKindOfClass:[WindowDelegate class]] &&
|
if (delegate && [delegate isKindOfClass:[WindowDelegate class]] &&
|
||||||
![window attachedSheet])
|
![window attachedSheet] && ![NSApp modalWindow])
|
||||||
[TopLevelWindowData activateInWindow:window];
|
[TopLevelWindowData activateInWindow:window];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -271,7 +271,7 @@
|
||||||
|
|
||||||
id delegate = [window delegate];
|
id delegate = [window delegate];
|
||||||
if (delegate && [delegate isKindOfClass:[WindowDelegate class]] &&
|
if (delegate && [delegate isKindOfClass:[WindowDelegate class]] &&
|
||||||
![window attachedSheet])
|
![window attachedSheet] && ![NSApp modalWindow])
|
||||||
[TopLevelWindowData deactivateInWindow:window];
|
[TopLevelWindowData deactivateInWindow:window];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue