mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-27 21:47:50 -04:00
compositor: prefer live wlr-output scale over the startup randr snapshot
port 2.0
(cherry picked from commit b0fea51132)
This commit is contained in:
1 parent
5ef5a7391b
commit
2c0998f1dc
1 file changed
+6
-5
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user