forked from Shinonome/dots-hyprland
hyprlandxkb: dont update when not necessary
This commit is contained in:
@@ -91,9 +91,12 @@ Singleton {
|
|||||||
root.needsLayoutRefresh = false;
|
root.needsLayoutRefresh = false;
|
||||||
fetchLayoutsProc.running = true;
|
fetchLayoutsProc.running = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If there's only one layout, the updated layout is always the same
|
||||||
|
if (root.layoutCodes.length <= 1) return;
|
||||||
|
|
||||||
// Update when layout might have changed
|
// Update when layout might have changed
|
||||||
const dataString = event.data;
|
const dataString = event.data;
|
||||||
// console.log("[HyprlandXkb] Received raw event:", event.name, "with data:", dataString);
|
|
||||||
if (!dataString.startsWith(root.targetDeviceName))
|
if (!dataString.startsWith(root.targetDeviceName))
|
||||||
return;
|
return;
|
||||||
root.currentLayoutName = dataString.split(",")[1];
|
root.currentLayoutName = dataString.split(",")[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user