Fix issue changing scale when all logical monitors require the same scale. Pull in driver setup update.

This commit is contained in:
wheaney 2024-07-25 10:03:05 -07:00
parent 0b953c9cb9
commit 56a7d41ec6
2 changed files with 5 additions and 3 deletions

View File

@ -109,6 +109,7 @@ function performOptimalModeCheck(displayConfigProxy, connectorName, headsetAsPri
let ourMonitor = undefined;
let monitorToModeIdMap = {};
let bestFitMode = undefined;
const skipScaleUpdate = !!properties['global-scale-required'];
for (let monitor of monitors) {
const [details, availableModes, monProperties] = monitor;
const [connector, vendor, product, monitorSerial] = details;
@ -157,7 +158,8 @@ function performOptimalModeCheck(displayConfigProxy, connectorName, headsetAsPri
const updatedLogicalMonitors = logicalMonitors.map((logicalMonitor) => {
const [x, y, scale, transform, primary, monitors, logMonProperties] = logicalMonitor;
const hasOurMonitor = !!monitors.some((monitor) => monitor[0] === connectorName);
anyMonitorsChanged |= hasOurMonitor && bestFitMode.bestScale !== scale;
const newScale = (!skipScaleUpdate && hasOurMonitor) ? bestFitMode.bestScale : scale;
anyMonitorsChanged |= newScale !== scale;
// there can only be one primary monitor, so we need to set all other monitors to not primary and glasses to primary,
// if headsetAsPrimary is true
@ -165,7 +167,7 @@ function performOptimalModeCheck(displayConfigProxy, connectorName, headsetAsPri
return [
x,
y,
hasOurMonitor ? bestFitMode.bestScale : scale,
newScale,
transform,
headsetAsPrimary ? hasOurMonitor : primary,
monitors.map((monitor) => {

@ -1 +1 @@
Subproject commit b0080ca844e057d31aae0e70aa6d026059ea304f
Subproject commit 9066a1d1c6b63a71f1d39e4b946ae06cc5c673a6