From a18ccb06e6e7110f23f489b6fc33244944d9a163 Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Mon, 20 Dec 2021 03:26:47 -0800 Subject: [PATCH] Use bufferGeometry as base point for input panel popup. The cordinate from text-input protocol is based on original surface, instead of the geometry based on any external protocol, e.g. xdg_surface. --- src/inputpanelv1client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inputpanelv1client.cpp b/src/inputpanelv1client.cpp index 981baea9ba..3336065410 100644 --- a/src/inputpanelv1client.cpp +++ b/src/inputpanelv1client.cpp @@ -103,7 +103,7 @@ void KWin::InputPanelV1Client::reposition() cursorRectangle = textInputV3->cursorRectangle(); } if (textClient) { - cursorRectangle.translate(textClient->pos() + textClient->clientPos()); + cursorRectangle.translate(textClient->bufferGeometry().topLeft()); const QRect screen = Workspace::self()->clientArea(PlacementArea, cursorRectangle.bottomLeft(), 0); // Reuse the similar logic like xdg popup