Minor tweaks

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2021-03-19 15:44:55 +08:00
parent 0ad045ea74
commit b62dabcc68
1 changed files with 1 additions and 1 deletions

View File

@ -772,7 +772,7 @@ void Utilities::displaySystemMenu(const QWindow *window, const QPoint &pos)
SetMenuItemInfoW(hMenu, SC_MINIMIZE, FALSE, &mii);
}
const bool isRtl = QGuiApplication::layoutDirection() == Qt::RightToLeft;
const QPoint point = pos.isNull() ? QCursor::pos(window->screen()) : pos;
const QPoint point = pos.isNull() ? QCursor::pos(window->screen()) : window->mapToGlobal(pos);
const LPARAM cmd = TrackPopupMenu(hMenu,
(TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD | TPM_TOPALIGN |
(isRtl ? TPM_RIGHTALIGN : TPM_LEFTALIGN)),