diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-12-03 10:35:13 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2019-01-02 11:48:01 +0000 |
commit | 00c0bad3184e32ff0b1dd799b7ef121eaa737c0d (patch) | |
tree | a6099c3701defba634708cf508bd42ea14045114 /src/shared | |
parent | 09b6fcf3ec501cb94d89833745264a16c2a74209 (diff) |
Client: Fix various input related crashes for events without focus
Some compositors fail to send wl_pointer.enter events before button and axis
events. This led to nullptr dereference crashes.
[ChangeLog][QPA plugin] Fixed a crash caused by compositors sending incorrect
pointer events.
Fix it by adding nullptr checks before trying to access the pointer focus in
case the compositor didn't send enter, or if something deleted the surface
(it's a QPointer).
This means we are now silently ignoring events for misbehaving compositors
(which is probably not optimal), but I don't see how we can easily distinguish
between a missing enter and a deleted QWaylandSurface without adding more
bookkeeping overhead.
Ditto for wl_keyboard.
Fixes: QTBUG-72235
Change-Id: I4bfaa3da4ebae37b059e1e450975566559edf40b
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'src/shared')
0 files changed, 0 insertions, 0 deletions