vcl/qt5/Qt5System.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
New commits: commit 689e3c8b91bb95bf13800833354f843edcfa1a5d Author: Katarina Behrens <[email protected]> Date: Fri Jul 6 16:35:13 2018 +0200 Implement reading screen count and screen geometry this improves restoring window location should it be within the secondary screen Change-Id: Iaac6bcead6bfcb7ae9eda579e5a4ad6b2482cc39 diff --git a/vcl/qt5/Qt5System.cxx b/vcl/qt5/Qt5System.cxx index 0de1940d9eff..ca533923913b 100644 --- a/vcl/qt5/Qt5System.cxx +++ b/vcl/qt5/Qt5System.cxx @@ -7,21 +7,23 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <QtWidgets/QApplication> +#include <QtWidgets/QDesktopWidget> + #include <string.h> #include <tools/gen.hxx> #include <Qt5System.hxx> +#include <Qt5Tools.hxx> Qt5System::Qt5System() {} Qt5System::~Qt5System() {} -unsigned int Qt5System::GetDisplayScreenCount() { return 1; } +unsigned int Qt5System::GetDisplayScreenCount() { return QApplication::desktop()->screenCount(); } tools::Rectangle Qt5System::GetDisplayScreenPosSizePixel(unsigned int nScreen) { - tools::Rectangle aRect; - if (nScreen == 0) - aRect = tools::Rectangle(Point(0, 0), Size(1024, 768)); - return aRect; + QRect qRect = QApplication::desktop()->screenGeometry(nScreen); + return toRectangle(qRect); } int Qt5System::ShowNativeDialog(const OUString&, const OUString&, const std::vector<OUString>&) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
