Commit 2c2921f
fix: disable context menu on right click
1. Remove right-click and touch long-press context menu behavior from
the windowed icon delegate.
2. Simplify input handling in IconItemDelegate by consolidating
interactions into MouseArea events and removing the extra TapHandler-
based menu/click logic.
3. Keep left-click activation behavior intact, while allowing right-
button events to be received without triggering duplicated or unintended
handling paths.
4. Preserve drag image generation only for left-button press when drag-
and-drop is enabled.
5. Adjust launcher item input handling to use TapHandler for mouse
buttons and a separate touchscreen TapHandler for tap activation,
avoiding the previous event-order issue noted in the comment.
6. These changes were necessary to match the updated interaction
requirement that right mouse click and touchscreen long press should
no longer show a context menu, while also reducing conflicting event
processing between MouseArea and TapHandler.
Influence:
1. Verify left-click on an icon still opens or activates the target
item normally.
2. Verify right-click on a windowed icon does not show a context menu
and does not trigger unintended actions.
3. Verify long-press on a touchscreen icon does not show a context menu.
4. Verify drag-and-drop still works correctly when pressing and dragging
with the left mouse button.
5. Verify launcher toggling still works with mouse left-click.
6. Verify launcher toggling still works with touchscreen tap.
7. Regression test mixed input scenarios to ensure MouseArea and
TapHandler no longer produce duplicate triggers or incorrect state
changes.
fix: 禁用右键上下文菜单弹出
1. 移除窗口模式图标代理中的右键和触控长按上下文菜单行为。
2. 简化 IconItemDelegate 的输入处理逻辑,将交互集中到 MouseArea 事件中,
并移除额外基于 TapHandler 的菜单/点击处理逻辑。
3. 保持左键激活行为不变,同时允许接收右键事件,但避免触发重复或非预期的
处理路径。
4. 仅在启用拖拽时的左键按下场景下保留拖拽预览图生成逻辑。
5. 调整 launcheritem 的输入处理,改为使用 TapHandler 处理鼠标按键,并增
加独立的触摸屏 TapHandler 处理点击激活,以规避注释中提到的事件顺序问题。
6. 这些修改是为了满足新的交互要求:鼠标右键和触控屏长按都不再弹出右键菜
单,同时减少 MouseArea 与 TapHandler 并存时的事件冲突。
Influence:
1. 验证左键点击图标后仍能正常打开或激活目标项。
2. 验证右键点击窗口模式图标时不会弹出右键菜单,且不会触发非预期操作。
3. 验证触控屏长按图标时不会弹出右键菜单。
4. 验证使用鼠标左键按下并拖动时,拖拽功能仍然正常。
5. 验证使用鼠标左键点击时,启动器开关功能仍然正常。
6. 验证使用触控屏点击时,启动器开关功能仍然正常。
7. 回归测试混合输入场景,确保 MouseArea 与 TapHandler 不会再产生重复触发
或状态异常。
PMS: BUG-358827
Change-Id: I29e423fa5fa40dd3165417118756d3b143a5fb2d1 parent 1abad99 commit 2c2921f
2 files changed
Lines changed: 25 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | 52 | | |
| 53 | + | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 55 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 56 | + | |
75 | 57 | | |
76 | 58 | | |
77 | 59 | | |
78 | 60 | | |
79 | 61 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
91 | 67 | | |
| 68 | + | |
| 69 | + | |
92 | 70 | | |
93 | 71 | | |
| 72 | + | |
94 | 73 | | |
95 | 74 | | |
96 | 75 | | |
| |||
154 | 133 | | |
155 | 134 | | |
156 | 135 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | 136 | | |
173 | 137 | | |
174 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
389 | 388 | | |
390 | 389 | | |
391 | 390 | | |
392 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
393 | 401 | | |
394 | 402 | | |
395 | 403 | | |
| |||
0 commit comments