# HG changeset patch # User Chris Cannam # Date 1253704933 0 # Node ID 265898470c5379d60acae5fe87dc3134770a4c20 # Parent 0ce7566717b2f47956192b7680d102ebe5a52c34 * Make NO_PIXMAP_COPY_TO_SELF the default diff -r 0ce7566717b2 -r 265898470c53 view/View.cpp --- a/view/View.cpp Wed Sep 23 11:21:07 2009 +0000 +++ b/view/View.cpp Wed Sep 23 11:22:13 2009 +0000 @@ -1603,9 +1603,18 @@ getXForFrame(m_centreFrame); if (dx > -width() && dx < width()) { -#if defined(Q_WS_WIN32) || defined(Q_WS_MAC) || defined(NO_PIXMAP_COPY_TO_SELF) - // Copying a pixmap to itself doesn't work properly on Windows - // or Mac (it only works when moving in one direction) +#ifdef PIXMAP_COPY_TO_SELF + // This is not normally defined. Copying a pixmap to + // itself doesn't work properly on Windows, Mac, or + // X11 with the raster backend (it only works when + // moving in one direction and then presumably only by + // accident). It does actually seem to be fine on X11 + // with the native backend, but we prefer not to use + // that anyway + paint.begin(m_cache); + paint.drawPixmap(dx, 0, *m_cache); + paint.end(); +#else static QPixmap *tmpPixmap = 0; if (!tmpPixmap || tmpPixmap->width() != width() || @@ -1619,11 +1628,6 @@ paint.begin(m_cache); paint.drawPixmap(dx, 0, *tmpPixmap); paint.end(); -#else - // But it seems to be fine on X11 - paint.begin(m_cache); - paint.drawPixmap(dx, 0, *m_cache); - paint.end(); #endif if (dx < 0) { cacheRect = QRect(width() + dx, 0, -dx, height());