From 3d3fcd7ab4ff7f13b6c0170cc204c2ee21b20866 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 28 Jun 2022 03:30:51 +0200 Subject: [PATCH] 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. --- src/wayland/tablet_v2_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/tablet_v2_interface.cpp b/src/wayland/tablet_v2_interface.cpp index a418091ad5..334040c83b 100644 --- a/src/wayland/tablet_v2_interface.cpp +++ b/src/wayland/tablet_v2_interface.cpp @@ -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;