diff --git a/src/wayland/seat_interface.cpp b/src/wayland/seat_interface.cpp index 288a74f288..7a8b29f567 100644 --- a/src/wayland/seat_interface.cpp +++ b/src/wayland/seat_interface.cpp @@ -1585,10 +1585,10 @@ void SeatInterface::setFocusedTextInputSurface(SurfaceInterface *surface) if (d->focusedTextInputSurface != surface){ d->textInputV2->d->sendLeave(serial, d->focusedTextInputSurface); + d->focusedTextInputSurface = surface; emit focusedTextInputSurfaceChanged(); } - d->focusedTextInputSurface = surface; if (d->focusedTextInputSurface) { d->focusedSurfaceDestroyConnection = connect(surface, &SurfaceInterface::aboutToBeDestroyed, this, [this] {