Commit 7207782
Add tap-and-hold as the touch equivalent of right-click cancel
Touchscreens have no secondary button, so there was no way to cancel
a pending/completed connection or room selection on touch -- only
2-finger pinch/pan was handled in touchEvent; single-finger touch fell
straight through to Qt's synthesized mouse events with no equivalent
of right-click. Track a single-finger touch's start position and time;
if held roughly in place (within 15px) for 500ms without lifting,
fire the same cancel path as right-click. A normal tap still flows
through unchanged since the synthesized mouse press/release isn't
touched.
Factored the cancel logic (previously duplicated for connections) into
a shared cancelPendingSelection(), and used it to fix the same
plain-right-click-never-reaches-Cancel bug for SELECT_ROOMS that was
already fixed for the connection modes -- its "Cancel" block in the
mode switch was equally unreachable via a plain right-click.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AHGhPpZVqQD9o39ryopvXu1 parent 0f5e949 commit 7207782
3 files changed
Lines changed: 76 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
245 | 255 | | |
246 | 256 | | |
247 | 257 | | |
| |||
300 | 310 | | |
301 | 311 | | |
302 | 312 | | |
| 313 | + | |
303 | 314 | | |
304 | 315 | | |
305 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
158 | 162 | | |
159 | 163 | | |
160 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
161 | 188 | | |
162 | 189 | | |
163 | 190 | | |
| |||
333 | 360 | | |
334 | 361 | | |
335 | 362 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
340 | 386 | | |
341 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
342 | 395 | | |
343 | 396 | | |
344 | 397 | | |
| |||
546 | 599 | | |
547 | 600 | | |
548 | 601 | | |
549 | | - | |
550 | | - | |
551 | | - | |
| 602 | + | |
552 | 603 | | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
557 | 607 | | |
558 | 608 | | |
559 | 609 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
| |||
0 commit comments