Fix the input panel popup anchor position.

It should be bottom left instead of top left of the cursor rect.
This commit is contained in:
Weng Xuetian 2021-12-18 21:06:14 -08:00
parent 5d99392d1e
commit 8c54c5937a
No known key found for this signature in database
GPG key ID: 8E8B898CBF2412F9

View file

@ -107,7 +107,7 @@ void KWin::InputPanelV1Client::reposition()
const QRect screen = Workspace::self()->clientArea(PlacementArea, cursorRectangle.bottomLeft(), 0);
// Reuse the similar logic like xdg popup
QRect popupRect(popupOffset(cursorRectangle, Qt::TopEdge | Qt::LeftEdge, Qt::RightEdge | Qt::BottomEdge, surface()->size()), surface()->size());
QRect popupRect(popupOffset(cursorRectangle, Qt::BottomEdge | Qt::LeftEdge, Qt::RightEdge | Qt::BottomEdge, surface()->size()), surface()->size());
if (popupRect.left() < screen.left()) {
popupRect.moveLeft(screen.left());