Skip to content

Commit 66c84ca

Browse files
committed
fix(launcher): fix search result items not responding to mouse clicks in windowed mode
The MouseArea was bound to `enabled: root.dndEnabled`, which defaults to false in SearchResultView delegates. This caused the MouseArea to be completely disabled, preventing onClicked from firing. Meanwhile, the Button consumed mouse events, blocking the outer TapHandler from receiving them — resulting in all three click mechanisms failing. Changed MouseArea to always be enabled and conditionally set drag.target instead, so click handling works regardless of dndEnabled while drag behavior remains controlled. Log: Fix search result items not responding to mouse clicks in windowed mode Influence: 1. Open the launcher in windowed mode 2. Type a keyword in the search box to trigger the search result list 3. Click on an app icon in the search results and verify it launches correctly 4. Right-click on an app icon in the search results and verify the context menu appears 5. Verify click and drag operations still work correctly in the frequently used and recently installed views fix: 修复小窗口模式搜索列表中应用无法鼠标点击的问题 MouseArea 的 enabled 绑定到了 root.dndEnabled,而搜索结果的 delegate 未设置该属性,默认值为 false,导致 MouseArea 被完全禁用,onClicked 无法触发。同时 Button 消费了鼠标事件,阻止了外层 TapHandler 接收 事件,导致三层点击机制全部失效。 将 MouseArea 改为始终启用,仅通过 drag.target 条件控制拖拽行为, 使点击处理不再依赖 dndEnabled 的值。 Log: 修复小窗口模式搜索列表中应用无法鼠标点击的问题 Influence: 1. 打开小窗口模式的启动器 2. 在搜索框中输入关键字,触发搜索结果列表 3. 点击搜索结果中的应用图标,验证应用能正常启动 4. 右键点击搜索结果中的应用图标,验证右键菜单正常弹出 5. 验证常用应用和最近安装区域的点击和拖拽操作仍然正常 PMS: BUG-352527
1 parent 116b829 commit 66c84ca

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

qml/windowed/IconItemDelegate.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Control {
5050
anchors.fill: parent
5151
hoverEnabled: false
5252
acceptedButtons: Qt.LeftButton
53-
enabled: root.dndEnabled
54-
drag.target: root
53+
enabled: true
54+
drag.target: root.dndEnabled ? root : null
5555
onPressed: function (mouse) {
5656
if (mouse.button === Qt.LeftButton && root.dndEnabled) {
5757
appIcon.grabToImage(function(result) {

0 commit comments

Comments
 (0)