Bug 574229: Open new window in the current OS X space when opening from the dock menu. r=gavin

This commit is contained in:
Josh Aas 2012-08-07 15:28:16 -04:00
parent d291fe7619
commit 57ba9dd5ee

View File

@ -27,11 +27,15 @@
<script type="application/javascript">
function OpenBrowserWindowFromDockMenu() {
let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
.getService(Ci.nsIMacDockSupport);
dockSupport.activateApplication(true);
let win = OpenBrowserWindow();
win.addEventListener("load", function listener() {
win.removeEventListener("load", listener);
let dockSupport = Cc["@mozilla.org/widget/macdocksupport;1"]
.getService(Ci.nsIMacDockSupport);
dockSupport.activateApplication(true);
});
return OpenBrowserWindow();
return win;
}
addEventListener("load", function() { gBrowserInit.nonBrowserWindowStartup() }, false);