mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 1549537 - Unconditionally offer 'Span' option for desktop background position on Linux. r=sfoster
Bug 1544105 added a default implementation of `GfxInfoBase::FindMonitors` so `gfxInfo.getMonitors()` no longer throws on Linux, but it only ever returns the primary monitor there. Differential Revision: https://phabricator.services.mozilla.com/D30096 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
566d9090f7
commit
8b8cafe43c
@ -33,13 +33,14 @@ var gSetBackground = {
|
||||
document.documentElement.getButton("accept").hidden = true;
|
||||
} else {
|
||||
let multiMonitors = false;
|
||||
try {
|
||||
if (AppConstants.platform == "linux") {
|
||||
// getMonitors only ever returns the primary monitor on Linux, so just
|
||||
// always show the option
|
||||
multiMonitors = true;
|
||||
} else {
|
||||
const gfxInfo = Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo);
|
||||
const monitors = gfxInfo.getMonitors();
|
||||
multiMonitors = monitors.length > 1;
|
||||
} catch (e) {
|
||||
// getMonitors() isn't implemented on Linux
|
||||
multiMonitors = true;
|
||||
}
|
||||
|
||||
if (!multiMonitors || AppConstants.isPlatformAndVersionAtMost("win", 6.1)) {
|
||||
|
Loading…
Reference in New Issue
Block a user