[Pkg-mozext-commits] [adblock-plus] 366/464: When applying to windows on install, use front-to-back order (see bug 819561)
David Prévot
taffit at moszumanska.debian.org
Tue Jul 22 20:44:34 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit e2c8d962382786ca38a79e678d89c4cef60ca306
Author: Wladimir Palant <trev at adblockplus.org>
Date: Mon Feb 4 08:43:32 2013 +0100
When applying to windows on install, use front-to-back order (see bug 819561)
---
lib/windowObserver.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/windowObserver.js b/lib/windowObserver.js
index 5919d58..cb6dc8b 100644
--- a/lib/windowObserver.js
+++ b/lib/windowObserver.js
@@ -35,7 +35,12 @@ function WindowObserver(listener, when)
this._listener = listener;
this._when = when;
- let e = Services.ww.getWindowEnumerator();
+ let e = Services.wm.getZOrderDOMWindowEnumerator(null, true);
+ if (!e.hasMoreElements())
+ {
+ // On Linux the list returned will be empty, see bug 156333. Fall back to random order.
+ e = Services.wm.getEnumerator(null);
+ }
while (e.hasMoreElements())
{
let window = e.getNext().QueryInterface(Ci.nsIDOMWindow);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list