Bug 1138287 - Part 3: Add an option to set screen ID in windowWatcher.openWindow. r=roc

This commit is contained in:
Shelly Lin 2015-06-05 11:31:55 +08:00
parent 0c646b32d4
commit 6c64ae3400

View File

@ -756,6 +756,14 @@ nsWindowWatcher::OpenWindowInternal(nsIDOMWindow* aParent,
nsIWindowCreator2::PARENT_IS_LOADING_OR_RUNNING_TIMEOUT;
}
// B2G multi-screen support. mozDisplayId is returned from the
// "display-changed" event, it is also platform-dependent.
#ifdef MOZ_WIDGET_GONK
int retval = WinHasOption(features.get(), "mozDisplayId", 0, nullptr);
windowCreator2->SetScreenId(retval);
#endif
bool cancel = false;
rv = windowCreator2->CreateChromeWindow2(parentChrome, chromeFlags,
contextFlags, uriToLoad,