From 3510c7324d34eb4c67fa6c8fdf0507e87eb1d25e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 5 Nov 2015 12:29:43 +0100 Subject: topLevelAt(): convert to native coordinates. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QPlatformScreen works in native pixels and the (device independent) coordinates from QWindow needs to be converted. Change-Id: I85ff45d66dc501e8c3c1c7a18f87448c92d79b9d Reviewed-by: Tor Arne Vestbø Reviewed-by: Friedemann Kleint Reviewed-by: J-P Nurmi --- src/gui/kernel/qplatformscreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/kernel/qplatformscreen.cpp') diff --git a/src/gui/kernel/qplatformscreen.cpp b/src/gui/kernel/qplatformscreen.cpp index d1d8eba697..8666d0a04c 100644 --- a/src/gui/kernel/qplatformscreen.cpp +++ b/src/gui/kernel/qplatformscreen.cpp @@ -90,7 +90,7 @@ QWindow *QPlatformScreen::topLevelAt(const QPoint & pos) const QWindowList list = QGuiApplication::topLevelWindows(); for (int i = list.size()-1; i >= 0; --i) { QWindow *w = list[i]; - if (w->isVisible() && w->geometry().contains(pos)) + if (w->isVisible() && QHighDpi::toNativePixels(w->geometry(), w).contains(pos)) return w; } -- cgit v1.2.3