Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wl: do not set to null the surface and target at touch_on_up()
On a multitouch screen, when several fingers are on the screen at the same time, if we set to null surface and target on touch_on_up() then we stop all the ongoing touch gestures and not only the one of the finger that caused the up event. That is becasue touch_on_motion() will refuse to process further events if surface or target are null. Instead of doing that do not set to null this pointers on the touch_on_up() event. The value of those will be set again on the next touch_on_down() event in any case. Also make seat->touch_target a weak reference, that way if the CogViewport gets destroyed before the touch-move and/or touch-up events arrive it will be set to NULL automatically and we avoid use-after-free of a stale pointer. Related: #698 Related: https://bugs.webkit.org/show_bug.cgi?id=270516
- Loading branch information