fix: eliminate Workspace Manager UI lag with optimistic state updates and 120ms high-speed sync
This commit is contained in:
parent
4fac2f05da
commit
0dea1ec978
@ -13,12 +13,10 @@ Item {
|
|||||||
property var workspaceNames: []
|
property var workspaceNames: []
|
||||||
|
|
||||||
function switchTo(index) {
|
function switchTo(index) {
|
||||||
switchProc.command = ["python3", Quickshell.env("HOME") + "/.config/quickshell/services/python/workspace_service.py", "switch", index.toString()]
|
if (index <= 0) return;
|
||||||
switchProc.running = true
|
// Optimistic UI update for zero visual latency
|
||||||
}
|
root.activeWorkspace = index
|
||||||
|
Quickshell.execDetached(["python3", Quickshell.env("HOME") + "/.config/quickshell/services/python/workspace_service.py", "switch", index.toString()])
|
||||||
Process {
|
|
||||||
id: switchProc
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
@ -51,7 +49,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
interval: 400
|
interval: 120
|
||||||
running: true
|
running: true
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user