mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-21 18:54:01 -04:00
niri: only emit displayScales when a scale changed
ref #3842
port 2.0
(cherry picked from commit 90d3c9731c)
This commit is contained in:
@@ -334,9 +334,18 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
if (sameScales(displayScales, scales))
|
||||
return;
|
||||
displayScales = scales;
|
||||
}
|
||||
|
||||
function sameScales(a, b) {
|
||||
const names = Object.keys(a);
|
||||
if (names.length !== Object.keys(b).length)
|
||||
return false;
|
||||
return names.every(name => a[name] === b[name]);
|
||||
}
|
||||
|
||||
function sortWindowsByLayout(windowList) {
|
||||
const enriched = windowList.map(w => {
|
||||
const ws = workspaces[w.workspace_id];
|
||||
|
||||
Reference in New Issue
Block a user