Use frameGeometry directly as screen geometry.

This fixes the border when CSD is being used.
This commit is contained in:
Weng Xuetian 2021-11-08 09:11:12 -08:00
parent 92173b5ff7
commit 4b05358dea
No known key found for this signature in database
GPG Key ID: 8E8B898CBF2412F9
1 changed files with 1 additions and 2 deletions

View File

@ -408,11 +408,10 @@ void fcitx::FcitxCandidateWindow::updateClientSideUI(
// intent to use this with wayland. It we have no information above screen
// edge.
if (isWayland_) {
screenGeometry = QRect(QPoint(0, 0), window->size());
screenGeometry = window->frameGeometry();
cursorRect.translate(window->framePosition());
auto margins = window->frameMargins();
cursorRect.translate(margins.left(), margins.top());
screenGeometry.translate(window->framePosition());
} else {
screenGeometry = window->screen()->geometry();
auto pos = window->mapToGlobal(cursorRect.topLeft());