summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbbackingstore.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-06-22 12:25:33 +0200
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-07-30 12:45:07 +0000
commitec462b245fa138a6b036f3db9c960015a36fd828 (patch)
treebfe4656894acc00f5ce2ef4af7641bcacace2670 /src/plugins/platforms/xcb/qxcbbackingstore.cpp
parentfd6821740fece8650cac7494a2cffe63e2bebb9c (diff)
X11 changes for highdpi
Adapt the xcb plugin to work with the new cross-platform high-DPI scaling. Fixes for drag and drop is done in a separate change. Task-number: QTBUG-46615 Change-Id: I29002721169750b9de59edb0f3e9134adabc4855 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbbackingstore.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index 44e9a54dc4..e62d515b62 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -49,6 +49,7 @@
#include <qdebug.h>
#include <qpainter.h>
#include <qscreen.h>
+#include <QtGui/private/qhighdpiscaling_p.h>
#include <qpa/qplatformgraphicsbuffer.h>
#include <algorithm>
@@ -365,7 +366,7 @@ void QXcbBackingStore::flush(QWindow *window, const QRegion &region, const QPoin
QSize imageSize = m_image->size();
QRegion clipped = region;
- clipped &= QRect(QPoint(), window->size());
+ clipped &= QRect(QPoint(), QHighDpi::toNativePixels(window->size(), window));
clipped &= QRect(0, 0, imageSize.width(), imageSize.height()).translated(-offset);
QRect bounds = clipped.boundingRect();