Index: src/kernel/qapplication_x11.cpp
===================================================================
RCS file: /home/kde/qt-copy/src/kernel/qapplication_x11.cpp,v
retrieving revision 1.53
diff -u -r1.53 qapplication_x11.cpp
--- src/kernel/qapplication_x11.cpp	2002/01/26 20:44:27	1.53
+++ src/kernel/qapplication_x11.cpp	2002/02/23 08:58:39
@@ -1452,6 +1452,13 @@
     return v;
 }
 
+static void stack_ffffffff() {
+	long ffffffff[50];
+	for (int i = 0; i < 50; i++)
+		ffffffff[i] = 0xffffffff;
+}
+
+
 /*****************************************************************************
   qt_init() - initializes Qt for X11
  *****************************************************************************/
@@ -1813,15 +1820,41 @@
 
 #ifndef QT_NO_XRENDER
 	// See if XRender is supported on the connected display
-	int xrender_eventbase, xrender_errorbase;
+	int xrender_eventbase, xrender_errorbase;	
+	//
+	bool looking=false, found=false;
+	looking=true;
+	
 	if (XRenderQueryExtension(appDpy, &xrender_eventbase, &xrender_errorbase)) {
 	    // XRender is supported, let's see if we have a PictFormat for the
 	    // default visual
+		found=true; 
+
+		// doesn't fix it
+		// qDebug("burning time\n");
+		// for(int i = 0; i < 0x7fffffff; i++);
+		
+		// doesn't fix it
+		// sleep(5);
+		
+		// does fix it
+		// QApplication::syncX();
+		
+		// doesn't fix it
+		// QApplication::flushX();
+		stack_ffffffff();
 	    XRenderPictFormat *format =
 		XRenderFindVisualFormat(appDpy,
 					(Visual *) QPaintDevice::x_appvisual);
 	    qt_use_xrender = (format != 0);
+			
+		qDebug("xrender_eventbase: %d, xrender_errorbase: %d",xrender_eventbase,xrender_errorbase);
+		qDebug("RENDER format: %08lx", (long)format);
 	}
+
+	qDebug("looked for RENDER: %d", looking);
+	qDebug("found RENDER extension: %d", found);
+
 #endif // QT_NO_XRENDER
 
 #ifndef QT_NO_XKB
