Commit 221394f
WaylandBackend: Fix relative pointer state tracking
Fix two issues with tracking state related to relative pointer mode:
* m_bPointerLocked is currently only unset through the unlock event
handler. However, it is observed that when the locked pointer
object is destroyed, this event is not received while the unlock
occurs. Therefore, directly unset it when destroying the locked
pointer object.
This fixes the cursor staying hidden forever after rotating the
camera using the mouse in World of Warcraft.
* When setting relative mode, m_pLockedSurface is currently compared
against the target surface to avoid recreating the locked pointer
object on every frame. However, m_pLockedSurface is never set so
the code thinks we are setting relative mode on a different surface
each frame, causing a new locked pointer object to be created
each time.
Fix this by setting and unsetting m_pLockedSurface when a pointer
lock is created or destroyed.1 parent eaca937 commit 221394f
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2414 | 2414 | | |
2415 | 2415 | | |
2416 | 2416 | | |
| 2417 | + | |
2417 | 2418 | | |
2418 | 2419 | | |
2419 | 2420 | | |
| 2421 | + | |
| 2422 | + | |
2420 | 2423 | | |
2421 | 2424 | | |
2422 | 2425 | | |
| |||
2425 | 2428 | | |
2426 | 2429 | | |
2427 | 2430 | | |
| 2431 | + | |
| 2432 | + | |
2428 | 2433 | | |
2429 | 2434 | | |
2430 | 2435 | | |
| |||
0 commit comments