From 465c0a564647d4b33bd456a276afd61affd06365 Mon Sep 17 00:00:00 2001 From: JustOff Date: Sun, 16 Sep 2018 19:46:33 +0300 Subject: [PALEMOON] Skip notifications for background tabs when restoring a session --- application/palemoon/base/content/tabbrowser.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'application/palemoon/base/content') diff --git a/application/palemoon/base/content/tabbrowser.xml b/application/palemoon/base/content/tabbrowser.xml index 3de1c6be2..93818e290 100644 --- a/application/palemoon/base/content/tabbrowser.xml +++ b/application/palemoon/base/content/tabbrowser.xml @@ -1429,6 +1429,7 @@ var aRelatedToCurrent; var aSkipAnimation; var aOriginPrincipal; + var aSkipBackgroundNotify; if (arguments.length == 2 && typeof arguments[1] == "object" && !(arguments[1] instanceof Ci.nsIURI)) { @@ -1444,6 +1445,7 @@ aRelatedToCurrent = params.relatedToCurrent; aSkipAnimation = params.skipAnimation; aOriginPrincipal = params.originPrincipal; + aSkipBackgroundNotify = params.skipBackgroundNotify; } // if we're adding tabs, we're past interrupt mode, ditch the owner @@ -1467,6 +1469,11 @@ t.setAttribute("crop", "end"); t.setAttribute("validate", "never"); //PMed t.setAttribute("onerror", "this.removeAttribute('image');"); + + if (aSkipBackgroundNotify) { + t.setAttribute("skipbackgroundnotify", true); + } + t.className = "tabbrowser-tab"; this.tabContainer._unlockTabSizing(); @@ -4143,7 +4150,11 @@ this._fillTrailingGap(); this._handleTabSelect(); } else { - this._notifyBackgroundTab(tab); + if (tab.hasAttribute("skipbackgroundnotify")) { + tab.removeAttribute("skipbackgroundnotify"); + } else { + this._notifyBackgroundTab(tab); + } } // XXXmano: this is a temporary workaround for bug 345399 -- cgit v1.2.3