Fix crash on keyboard remove
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>
Fri, 1 May 2015 14:41:17 +0000 (17:41 +0300)
committerGiulio Camuffo <giulio.camuffo@jollamobile.com>
Mon, 4 May 2015 09:22:39 +0000 (09:22 +0000)
commit144777d0be9875135761ee596430c0e1359df833
tree8117850b911b7a8494003ec5670f31b62b31c7bf
parent6dc52bb81763dd88d020032212834c8d3a5b8027
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>
src/client/qwaylandinputdevice.cpp