diff options
author | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-11-05 12:29:43 +0100 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@theqtcompany.com> | 2015-11-18 14:11:31 +0000 |
commit | 3510c7324d34eb4c67fa6c8fdf0507e87eb1d25e (patch) | |
tree | 7cf27167fa61170b1e95315d314250b507b9f915 | |
parent | c87f3b22920b43347354ccf9e67f8b4cb6ea8c01 (diff) |
topLevelAt(): convert to native coordinates.
QPlatformScreen works in native pixels and the
(device independent) coordinates from QWindow
needs to be converted.
Change-Id: I85ff45d66dc501e8c3c1c7a18f87448c92d79b9d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
-rw-r--r-- | src/gui/kernel/qplatformscreen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |