changeset 548:265898470c53

* Make NO_PIXMAP_COPY_TO_SELF the default
author Chris Cannam
date Wed, 23 Sep 2009 11:22:13 +0000
parents 0ce7566717b2
children e6122e4999a3
files view/View.cpp
diffstat 1 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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());