summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-02-08 13:45:09 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-02-08 13:45:09 (GMT)
commit9d808132dbf2de191e3d1ab2a1222e584d7ff1bc (patch)
tree0da7e7e4e753f2a685ca49f18baf3f8536b34867 /src
parent6a4ef30a8f585a3dc20b337eb336ab028c97ddb7 (diff)
downloadQt-9d808132dbf2de191e3d1ab2a1222e584d7ff1bc.zip
Qt-9d808132dbf2de191e3d1ab2a1222e584d7ff1bc.tar.gz
Qt-9d808132dbf2de191e3d1ab2a1222e584d7ff1bc.tar.bz2
Made XCB report correct physical size.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.cpp5
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index 1adde6b..a9a24dd 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -75,3 +75,8 @@ QImage::Format QXcbScreen::format() const
{
return QImage::Format_RGB32;
}
+
+QSize QXcbScreen::physicalSize() const
+{
+ return QSize(m_screen->width_in_millimeters, m_screen->height_in_millimeters);
+}
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index 88de1a8..abebcd9 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -59,6 +59,7 @@ public:
QRect geometry() const;
int depth() const;
QImage::Format format() const;
+ QSize physicalSize() const;
xcb_screen_t *screen() const { return m_screen; }
xcb_window_t root() const { return m_screen->root; }