compositor: prefer live wlr-output scale over the startup randr snapshot

port 2.0
This commit is contained in:
bbedward committed 2026-10-26 13:59:22 -04:00
1 parent 404c9672d7
commit b0fea51132
1 file changed
+6 -5
+6 -5
View File
@@ -346,17 +346,18 @@ Singleton {
return screen.devicePixelRatio || 1;
}
const randrScale = randrScales[screen.name];
if (randrScale !== undefined && randrScale > 0)
return fractionalScale(randrScale);
if (WlrOutputService.wlrOutputAvailable && screen) {
// Live wlr-output state outranks the one-shot randr snapshot so scale changes propagate
if (WlrOutputService.wlrOutputAvailable) {
const wlrOutput = WlrOutputService.getOutput(screen.name);
if (wlrOutput?.enabled && wlrOutput.scale !== undefined && wlrOutput.scale > 0) {
return fractionalScale(wlrOutput.scale);
}
}
const randrScale = randrScales[screen.name];
if (randrScale !== undefined && randrScale > 0)
return fractionalScale(randrScale);
if (isNiri && screen) {
const niriScale = NiriService.displayScales[screen.name];
if (niriScale !== undefined)