Skip to content

Commit

Permalink
fix: 修改 handleDrop 接口调用
Browse files Browse the repository at this point in the history
在Qt 5.12 版本之后,官方修改了 handleDrop 接口的调用,之前的接口
不再考虑缩放。在5.12之后的版本上需要调用新的接口。
上游链接:https://codereview.qt-project.org/c/qt/qtbase/+/194697

Log: 修复社区版和3A5000上高分屏下拖动坐标错误的问题
Bug: https://pms.uniontech.com/zentao/bug-view-87585.html,https://pms.uniontech.com/zentao/bug-view-75835.html
Change-Id: I47c404a25821ac6b1f86c10cfd37c08a63bd2c86
  • Loading branch information
Tang Haixiang committed Jul 19, 2021
1 parent d4b7e61 commit e762179
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion xcb/windoweventhook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,16 @@ void WindowEventHook::handleClientMessageEvent(QXcbWindow *window, const xcb_cli

dropData->setProperty("IsDirectSaveMode", directSaveMode);

#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
QPlatformDropQtResponse response = QWindowSystemInterface::handleDrop(drag->currentWindow.data(),
dropData, drag->currentPosition,
dropData, drag->currentPosition,
supported_drop_actions,
QGuiApplication::mouseButtons(), QGuiApplication::keyboardModifiers());
#else
QPlatformDropQtResponse response = QWindowSystemInterface::handleDrop(drag->currentWindow.data(),
dropData, drag->currentPosition,
supported_drop_actions);
#endif
drag->setExecutedDropAction(response.acceptedAction());

if (directSaveMode) {
Expand Down

0 comments on commit e762179

Please sign in to comment.