From 8ba68e36b846cabc0b9379f2a0719fb82f7f07a0 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Tue, 9 Aug 2022 11:25:38 +0200 Subject: [PATCH] xcb: use global coordinates for position of D&D for xembed client Change-Id: I4805b764b11b86e2b0975ca45f7182f2719fda74 Reviewed-by: Liang Qi (cherry picked from commit 64cd43d394aa389ee28db5abad6a394d3ad44aea) Reviewed-by: Qt Cherry-pick Bot --- src/plugins/platforms/xcb/qxcbdrag.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index f5cb50d9c6b..b14839c1f4c 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -734,7 +734,7 @@ void QXcbDrag::handle_xdnd_position(QPlatformWindow *w, const xcb_client_message QPoint p((e->data.data32[2] & 0xffff0000) >> 16, e->data.data32[2] & 0x0000ffff); Q_ASSERT(w); QRect geometry = w->geometry(); - p -= geometry.topLeft(); + p -= w->isEmbedded() ? w->mapToGlobal(geometry.topLeft()) : geometry.topLeft(); if (!w || !w->window() || (w->window()->type() == Qt::Desktop)) return;