diff options
author | Alex Cucos <alex@bluetree.ie> | 2009-06-08 14:29:18 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-06-08 14:29:18 (GMT) |
commit | 4336436b8113d6a80428d70beda40a89713d04db (patch) | |
tree | 37a317239e7d1535a922cb38579556e2679ca4f8 | |
parent | 168f75927390d4ab726870946d60604abf994654 (diff) | |
download | Qt-4336436b8113d6a80428d70beda40a89713d04db.zip Qt-4336436b8113d6a80428d70beda40a89713d04db.tar.gz Qt-4336436b8113d6a80428d70beda40a89713d04db.tar.bz2 |
Clip region to screen coordinates before setting its component rectangles dirty.
When using Qt/E with VNC screen driver on top of the Linux framebuffer
(export QWS_DISPLAY="VNC:LinuxFb") the region to be exposed needs be clipped
to the real screen to avoid possible negative coordinates which in turn
cause access to invalid memory locations when comparing the content of the
VNC buffer with the Linux framebuffer.
Merge-request: 603
Reviewed-by: Tom Cooksey <thomas.cooksey@nokia.com>
-rw-r--r-- | src/gui/embedded/qscreenproxy_qws.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/embedded/qscreenproxy_qws.cpp b/src/gui/embedded/qscreenproxy_qws.cpp index 5b8f6f0..7652bd9 100644 --- a/src/gui/embedded/qscreenproxy_qws.cpp +++ b/src/gui/embedded/qscreenproxy_qws.cpp @@ -279,6 +279,7 @@ void QProxyScreen::exposeRegion(QRegion r, int changing) } realScreen->exposeRegion(r, changing); + r &= realScreen->region(); const QVector<QRect> rects = r.rects(); for (int i = 0; i < rects.size(); ++i) |