Skip to content

Commit

Permalink
topLevelAt(): convert to native coordinates.
Browse files Browse the repository at this point in the history
QPlatformScreen works in native pixels and the
(device independent) coordinates from QWindow
needs to be converted.

Change-Id: I85ff45d66dc501e8c3c1c7a18f87448c92d79b9d
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: J-P Nurmi <[email protected]>
  • Loading branch information
msorvig committed Nov 18, 2015
1 parent c87f3b2 commit 3510c73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/kernel/qplatformscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 3510c73

Please sign in to comment.