From feeafa93ed7d8029891108999f434971640b94ce Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 23 Sep 2020 13:41:35 +0300 Subject: [PATCH] Set focused text input surface before emitting focusedTextInputSurfaceChanged() When the focusedTextInputSurfaceChanged() signal is emitted, it is expected that SeatInterface::focusedTextInputSurface() will return the new focused text input surface. --- src/wayland/seat_interface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] {