[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser] 51/73: Bug 1783643 - Don't open downloads panel if window is inactive. r=Gijs, a=RyanVM
This is an automated email from the git hooks/post-receive script.
richard pushed a commit to branch geckoview-102.3.0esr-12.0-1
in repository tor-browser.
commit 1f0194a2c33cdec534e8fd13b6bd877e4a8fdb5c
Author: Shane Hughes <shmediaproductions@xxxxxxxxx>
AuthorDate: Mon Aug 8 12:15:40 2022 +0000
Bug 1783643 - Don't open downloads panel if window is inactive. r=Gijs, a=RyanVM
Since bug 1741076, the downloads panel is already configured not to show
the downloads panel if the top chrome window is inactive. However, this
check doesn't matter if the downloads panel has never been opened before
in the profile (represented by pref browser.download.panel.shown). This
patch changes the check so that if the top window is not active, we
don't show the panel, no matter what.
Differential Revision: https://phabricator.services.mozilla.com/D153334
---
browser/components/downloads/DownloadsCommon.jsm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/browser/components/downloads/DownloadsCommon.jsm b/browser/components/downloads/DownloadsCommon.jsm
index 11e119a0155ea..aab68856cd00c 100644
--- a/browser/components/downloads/DownloadsCommon.jsm
+++ b/browser/components/downloads/DownloadsCommon.jsm
@@ -994,13 +994,11 @@ DownloadsDataCtor.prototype = {
}
let shouldOpenDownloadsPanel =
- openDownloadsListOnStart &&
aType == "start" &&
Services.prefs.getBoolPref(
"browser.download.improvements_to_download_panel"
) &&
DownloadsCommon.summarizeDownloads(this._downloads).numDownloading <= 1 &&
- browserWin == Services.focus.activeWindow &&
gAlwaysOpenPanel;
// For new downloads after the first one, don't show the panel
@@ -1013,7 +1011,8 @@ DownloadsDataCtor.prototype = {
if (
aType != "error" &&
((this.panelHasShownBefore && !shouldOpenDownloadsPanel) ||
- !openDownloadsListOnStart)
+ !openDownloadsListOnStart ||
+ browserWin != Services.focus.activeWindow)
) {
DownloadsCommon.log("Showing new download notification.");
browserWin.DownloadsIndicatorView.showEventNotification(aType);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits