Commit 263f2ec
committed
fix: handle touch outside popup on X11
1. Add QTouchEvent handling to MouseGrabEventFilter in frame/
utility_x11.cpp.
2. Detect QEvent::TouchBegin and read the first touch point's global
position.
3. When the touch happens outside the target popup window geometry, emit
outsideMousePressed() and consume the event.
4. Keep the existing mouse-based outside-click logic unchanged while
extending the same close-popup behavior to touch input.
5. This fixes an issue on touch-screen devices where, after the plugin
area context menu was shown, tapping other areas of the taskbar did
not respond because touch interactions outside the popup were not being
handled.
Log: Fixed taskbar touch no-response issue when plugin area context menu
is open
Influence:
1. On an X11 touch-screen device, open the plugin area context menu
and tap outside the popup on different taskbar areas; verify the popup
closes and the tapped area responds correctly.
2. Verify existing mouse behavior is unchanged: right-click to open the
menu, then click outside to close it.
3. Test tapping inside the popup to confirm normal menu interaction
is preserved.
4. Test repeated open/close operations with both mouse and touch input
to ensure there are no stuck grab states or lost events.
5. Verify no regressions for non-touch environments on X11.
fix: 处理 X11 下弹窗外部触控关闭逻辑
1. 在 frame/utility_x11.cpp 的 MouseGrabEventFilter 中新增 QTouchEvent
处理逻辑。
2. 检测 QEvent::TouchBegin,并读取第一个触控点的全局坐标。
3. 当触控位置位于目标弹窗窗口几何范围之外时,触发 outsideMousePressed()
并消费该事件。
4. 在保留原有鼠标外部点击处理逻辑不变的基础上,将相同的关闭弹窗行为扩展
到触控输入。
5. 该修改修复了触控屏设备上插件区域右键菜单弹出后,点击任务栏其他区域无
响应的问题,原因是此前未处理弹窗外部的触控事件。
Log: 修复插件区域右键菜单打开时任务栏触控无响应问题
Influence:
1. 在 X11 触控屏设备上打开插件区域右键菜单后,点击弹窗外的不同任务栏区
域,确认弹窗会关闭且被点击区域能够正常响应。
2. 验证现有鼠标行为不受影响:右键打开菜单后,鼠标点击外部仍可正常关闭。
3. 测试在弹窗内部点击,确认菜单本身的交互仍然正常。
4. 使用鼠标和触控反复执行打开/关闭操作,确认不存在 grab 状态残留或事件丢
失问题。
5. 验证 X11 非触控环境下无回归。
PMS: BUG-362159
Change-Id: I3c6ed96f01408c3c966f17ae7b999858c0c9ec461 parent d6ea2b3 commit 263f2ec
1 file changed
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
122 | 137 | | |
123 | 138 | | |
124 | 139 | | |
125 | 140 | | |
126 | 141 | | |
127 | 142 | | |
128 | | - | |
| 143 | + | |
| 144 | + | |
129 | 145 | | |
130 | 146 | | |
131 | 147 | | |
| |||
137 | 153 | | |
138 | 154 | | |
139 | 155 | | |
140 | | - | |
| 156 | + | |
| 157 | + | |
141 | 158 | | |
142 | 159 | | |
143 | 160 | | |
144 | 161 | | |
145 | 162 | | |
146 | 163 | | |
147 | | - | |
| 164 | + | |
| 165 | + | |
148 | 166 | | |
149 | 167 | | |
150 | 168 | | |
| |||
0 commit comments