Fix crash on keyboard remove
If the compositor sent a wl_keyboard.leave and a new wl_seat.capabilities without the keyboard bit we would end up deleting the Keyboard object with a roundtrip in flight, ending up using freed memory later. Destroy the callback when destroying the keyboard, and notify the window system the active window is active no more. Change-Id: Ie415ca62b46e0b8ef0fe4d09c8e7a8130928df90 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This commit is contained in:
parent
b8be7b93a1
commit
d0740edb9c
@ -118,6 +118,10 @@ QWaylandInputDevice::Keyboard::~Keyboard()
|
||||
#ifndef QT_NO_WAYLAND_XKB
|
||||
releaseKeyMap();
|
||||
#endif
|
||||
if (mFocus)
|
||||
QWindowSystemInterface::handleWindowActivated(0);
|
||||
if (mFocusCallback)
|
||||
wl_callback_destroy(mFocusCallback);
|
||||
if (mParent->mVersion >= 3)
|
||||
wl_keyboard_release(object());
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user