tablet: Leave the surface we were previously on, not the one we are going to

This sometimes results in a crash and it's logically wrong as it was.
This commit is contained in:
Aleix Pol 2022-06-28 03:30:51 +02:00
parent 47c08d6f66
commit 3d3fcd7ab4

View file

@ -590,7 +590,7 @@ void TabletPadV2Interface::setCurrentSurface(SurfaceInterface *surface, TabletV2
}
if (d->m_currentSurface) {
d->send_leave(d->m_display->nextSerial(), surface->resource());
d->send_leave(d->resourceForSurface(d->m_currentSurface), d->m_display->nextSerial(), d->m_currentSurface->resource());
}
d->m_currentSurface = surface;