зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1707379
- Don't re-show visible windows, in order to avoid unintended window ordering changes on focus. r=spohl
This primarily affects alternative window managers which allow focusing background windows. Differential Revision: https://phabricator.services.mozilla.com/D134778
This commit is contained in:
Родитель
2b968a8e5e
Коммит
95c4aaa969
|
@ -780,12 +780,12 @@ void nsCocoaWindow::Show(bool bState) {
|
|||
|
||||
if (!mWindow) return;
|
||||
|
||||
// We need to re-execute sometimes in order to bring already-visible
|
||||
// windows forward.
|
||||
if (!mSheetNeedsShow && !bState && ![mWindow isVisible]) return;
|
||||
|
||||
// Protect against re-entering.
|
||||
if (bState && [mWindow isBeingShown]) return;
|
||||
if (!mSheetNeedsShow) {
|
||||
// Early exit if our current visibility state is already the requested state.
|
||||
if (bState == ([mWindow isVisible] || [mWindow isBeingShown])) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
[mWindow setBeingShown:bState];
|
||||
if (bState && !mWasShown) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче