aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/PlatQt.cpp
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2013-10-18 15:19:58 +1100
committerNeil <nyamatongwe@gmail.com>2013-10-18 15:19:58 +1100
commit1ee828ef5804f85fb40f9c6b031c499c29194267 (patch)
treeddd02c89674975d4c4e33b81d76b023747e49ec5 /qt/ScintillaEditBase/PlatQt.cpp
parent299e9eaa092873814c72af657cedb006a6bddfb5 (diff)
downloadscintilla-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.cpp3
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());
}