From 1ee828ef5804f85fb40f9c6b031c499c29194267 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 18 Oct 2013 15:19:58 +1100 Subject: Fix Window::GetMonitorRect when top left of screen is not 0,0. From John Ehresman. --- qt/ScintillaEditBase/PlatQt.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'qt/ScintillaEditBase/PlatQt.cpp') 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()); } -- cgit v1.2.3