File compiz-manager-detect-multiple-graphic-cards.patch of Package compiz-manager

Index: compiz-manager
===================================================================
--- compiz-manager.orig
+++ compiz-manager
@@ -237,13 +237,15 @@ check_texture_size()
 {
 	TEXTURE_LIMIT=$(glxinfo -l | grep GL_MAX_TEXTURE_SIZE | sed 's/.*=[^0-9]//g')
 	RESOLUTION=$(xdpyinfo  | grep -i dimensions: | sed 's/[^0-9]*pixels.*(.*).*//' | sed 's/[^0-9x]*//')
-	VRES=$(echo $RESOLUTION | sed 's/.*x//')
-	HRES=$(echo $RESOLUTION | sed 's/x.*//')
-	verbose "Comparing resolution ($RESOLUTION) to maximum 3D texture size ($TEXTURE_LIMIT): ";
-	if [ $VRES -gt $TEXTURE_LIMIT ] || [ $HRES -gt $TEXTURE_LIMIT ]; then
+	for res in $RESOLUTION; do
+	    VRES=$(echo $res | sed 's/.*x//')
+	    HRES=$(echo $res | sed 's/x.*//')
+	    verbose "Comparing resolution ($res) to maximum 3D texture size ($TEXTURE_LIMIT): ";
+	    if [ $VRES -gt $TEXTURE_LIMIT ] || [ $HRES -gt $TEXTURE_LIMIT ]; then
 		verbose "Failed.\n"
 		return 1;
-	fi
+	    fi
+	done
 	verbose "Passed.\n"
 	return 0
 }