File compiz-manager-dry_run.patch of Package compiz-manager

From 4e04f52ff5616a331f726cd46bca0bac9205b46e Mon Sep 17 00:00:00 2001
From: Kristian Lyngstol <kristian@bohemians.org>
Date: Tue, 30 Oct 2007 16:14:24 +0000
Subject: Add DRY_RUN capability

Uses an environmental variable to avoid dealing with pushing and
popping arguments to compiz.
---
Index: compiz-manager-0.6.0/compiz-manager
===================================================================
--- compiz-manager-0.6.0.orig/compiz-manager
+++ compiz-manager-0.6.0/compiz-manager
@@ -105,6 +105,11 @@ abort_with_fallback_wm()
 		verbose "SKIP_CHECKS is yes, so continuing despite problems.\n"
 		return 0;
 	fi
+	
+	if [ "x$CM_DRY" = "xyes" ]; then
+		verbose "Dry run failed: Problems detected with 3D support.\n"
+		exit 1;
+	fi
 
 	verbose "aborting and using fallback: $FALLBACKWM \n"
 
@@ -397,6 +402,10 @@ fi
 build_env
 build_args
 
+if [ "x$CM_DRY" = "xyes" ]; then
+	verbose "Dry run finished: everything should work with regards to Compiz and 3D.\n"
+	exit 0;
+fi
 # start the gtk-window-decorator if present
 if [ -x ${COMPIZ_BIN_PATH}emerald ] && [ "$USE_EMERALD" = "yes" ]; then
 	verbose "Starting emerald\n"