diff options
author | Neil <nyamatongwe@gmail.com> | 2013-10-18 15:19:58 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-10-18 15:19:58 +1100 |
commit | 1ee828ef5804f85fb40f9c6b031c499c29194267 (patch) | |
tree | ddd02c89674975d4c4e33b81d76b023747e49ec5 /qt/ScintillaEditBase/PlatQt.cpp | |
parent | 299e9eaa092873814c72af657cedb006a6bddfb5 (diff) | |
download | scintilla-mirror-1ee828ef5804f85fb40f9c6b031c499c29194267.tar.gz |
Fix Window::GetMonitorRect when top left of screen is not 0,0.
From John Ehresman.
Diffstat (limited to 'qt/ScintillaEditBase/PlatQt.cpp')
-rw-r--r-- | qt/ScintillaEditBase/PlatQt.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp index 371634067..71c4c08fc 100644 --- a/qt/ScintillaEditBase/PlatQt.cpp +++ b/qt/ScintillaEditBase/PlatQt.cpp @@ -738,8 +738,7 @@ PRectangle Window::GetMonitorRect(Point pt) QPoint posGlobal = window(wid)->mapToGlobal(QPoint(pt.x, pt.y)); QDesktopWidget *desktop = QApplication::desktop(); QRect rectScreen = desktop->availableGeometry(posGlobal); - rectScreen.moveLeft(-originGlobal.x()); - rectScreen.moveTop(-originGlobal.y()); + rectScreen.translate(-originGlobal.x(), -originGlobal.y()); return PRectangle(rectScreen.left(), rectScreen.top(), rectScreen.right(), rectScreen.bottom()); } |