diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2013-10-23 19:10:15 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-24 19:58:48 +0200 |
commit | a91f45afc49c465e1650e2395ba1183e3495888f (patch) | |
tree | 0463bb06360100469961baa08071eeff391372a6 | |
parent | c2221ea4b3666b98a8817eea2fc8e37d84f05c2d (diff) |
Return the physical screen's geometry
This is exposed through JS, and sometimes used to center popups and
so on. Exposing the virtual geometry in the case of multi-screen
setups can lead to quirky behavior.
Change-Id: I4fe395dd2a19e5c96d79a33ed6ca08bed9e3d086
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
-rw-r--r-- | shared/shared_globals.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/shared_globals.cpp b/shared/shared_globals.cpp index 08d2368db..70ef901db 100644 --- a/shared/shared_globals.cpp +++ b/shared/shared_globals.cpp @@ -56,8 +56,8 @@ void GetScreenInfoFromNativeWindow(QWindow* window, WebKit::WebScreenInfo* resul r.depth = screen->depth(); r.isMonochrome = (r.depth == 1); - QRect virtualGeometry = screen->virtualGeometry(); - r.rect = WebKit::WebRect(virtualGeometry.x(), virtualGeometry.y(), virtualGeometry.width(), virtualGeometry.height()); + QRect screenGeometry = screen->geometry(); + r.rect = WebKit::WebRect(screenGeometry.x(), screenGeometry.y(), screenGeometry.width(), screenGeometry.height()); QRect available = screen->availableGeometry(); r.availableRect = WebKit::WebRect(available.x(), available.y(), available.width(), available.height()); *results = r; |