From 4336436b8113d6a80428d70beda40a89713d04db Mon Sep 17 00:00:00 2001 From: Alex Cucos Date: Mon, 8 Jun 2009 16:29:18 +0200 Subject: 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 --- src/gui/embedded/qscreenproxy_qws.cpp | 1 + 1 file changed, 1 insertion(+) 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 rects = r.rects(); for (int i = 0; i < rects.size(); ++i) -- cgit v0.12