diff --git a/quickshell/modules/topbar/TopLeftBar.qml b/quickshell/modules/topbar/TopLeftBar.qml index 975bf25..db1e5b4 100644 --- a/quickshell/modules/topbar/TopLeftBar.qml +++ b/quickshell/modules/topbar/TopLeftBar.qml @@ -95,12 +95,22 @@ GlassPanel { id: wsItemMouse anchors.fill: parent hoverEnabled: true - onClicked: WorkspaceService.switchTo(wsItem.wsNumber) + onClicked: { + PopupService.closeAll() + WorkspaceService.switchTo(wsItem.wsNumber) + } } } } } + // Scroll Throttle Timer (Eliminates scroll lag during rapid mouse wheel scrolling) + Timer { + id: scrollThrottleTimer + interval: 120 + repeat: false + } + // Global Mouse Wheel Scroll Area MouseArea { anchors.fill: parent @@ -108,6 +118,10 @@ GlassPanel { acceptedButtons: Qt.NoButton onWheel: (wheel) => { + if (scrollThrottleTimer.running) return; + scrollThrottleTimer.restart(); + PopupService.closeAll() + if (wheel.angleDelta.y < 0) { if (WorkspaceService.activeWorkspace < WorkspaceService.totalWorkspaces) { WorkspaceService.switchTo(WorkspaceService.activeWorkspace + 1)