[tbb-commits] [tor-browser] 51/73: Bug 1783643 - Don't open downloads panel if window is inactive. r=Gijs, a=RyanVM

gitolite role git at cupani.torproject.org
Wed Sep 21 20:17:44 UTC 2022


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 at gmail.com>
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.


More information about the tbb-commits mailing list