From 582ea511267d4643fd830b490c893cc7156e63d0 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Mon, 27 Jul 2026 15:28:40 +0200 Subject: [PATCH] kf5: replace sloppy focus with click-to-focus The hover-based sloppy focus timer was stealing focus from buttons via paneRoot.focus=true every 100ms of mouse movement, making buttons very hard to click. Replace with a click-to-focus MouseArea that only updates the focusedPaneIndex on actual clicks, with mouse.accepted=false so clicks propagate to the target widget normally. --- gui/main-kf5.qml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/gui/main-kf5.qml b/gui/main-kf5.qml index 3502bdc..c1b9c89 100644 --- a/gui/main-kf5.qml +++ b/gui/main-kf5.qml @@ -1385,21 +1385,13 @@ ApplicationWindow { } } - // Sloppy focus + // Click-to-focus: update focused pane index on click MouseArea { anchors.fill: parent - hoverEnabled: true - acceptedButtons: Qt.NoButton + acceptedButtons: Qt.LeftButton propagateComposedEvents: true - onPositionChanged: sloppyTimer.restart() - onExited: sloppyTimer.stop() - } - Timer { - id: sloppyTimer - interval: 100 - onTriggered: { - paneRoot.focus = true - // Update focused index + onPressed: { + mouse.accepted = false for (var i = 0; i < mainContent.panes.length; i++) { if (mainContent.panes[i] === paneRoot) { mainContent.focusedPaneIndex = i