зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1816139 - In HeadlessWidget for default focus, check WindowType::TopLevel instead of mTopLevel. r=karlt
webrtcLegacyIndicator is a parentless window of type Popup, but should not receive focus by default. Differential Revision: https://phabricator.services.mozilla.com/D169787
This commit is contained in:
Родитель
763e9a2df6
Коммит
dea5671716
|
@ -156,7 +156,8 @@ void HeadlessWidget::GetCompositorWidgetInitData(
|
|||
nsIWidget* HeadlessWidget::GetTopLevelWidget() { return mTopLevel; }
|
||||
|
||||
void HeadlessWidget::RaiseWindow() {
|
||||
MOZ_ASSERT(mTopLevel == this || mWindowType == WindowType::Dialog ||
|
||||
MOZ_ASSERT(mWindowType == WindowType::TopLevel ||
|
||||
mWindowType == WindowType::Dialog ||
|
||||
mWindowType == WindowType::Sheet,
|
||||
"Raising a non-toplevel window.");
|
||||
|
||||
|
@ -195,8 +196,9 @@ void HeadlessWidget::Show(bool aState) {
|
|||
LOG(("HeadlessWidget::Show [%p] state %d\n", (void*)this, aState));
|
||||
|
||||
// Top-level window and dialogs are activated/raised when shown.
|
||||
if (aState && (mTopLevel == this || mWindowType == WindowType::Dialog ||
|
||||
mWindowType == WindowType::Sheet)) {
|
||||
if (aState &&
|
||||
(mWindowType == WindowType::TopLevel ||
|
||||
mWindowType == WindowType::Dialog || mWindowType == WindowType::Sheet)) {
|
||||
RaiseWindow();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче