summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Leuenberger <dominique@leuenberger.net>2010-12-28 15:50:26 +0100
committerDominique Leuenberger <dominique@leuenberger.net>2010-12-28 15:50:26 +0100
commit28dc57076fd11be48f8b90c679d251a5096d34bd (patch)
tree30cdabc68a7d7a8e75c8da811c394b665cb3888a
parent7b1a76b9c4540dba72dc8e93343b15aba4afef40 (diff)
downloadsimple-ccsm-28dc57076fd11be48f8b90c679d251a5096d34bd.tar.gz
simple-ccsm-28dc57076fd11be48f8b90c679d251a5096d34bd.tar.bz2
When disbaling compiz, put a disable-compiz file to indicate so.
Otherwise, on relogin, compiz-manager is being started again and does not have indication that compiz should not be enabled.
-rwxr-xr-xsimple-ccsm.in15
1 files changed, 14 insertions, 1 deletions
diff --git a/simple-ccsm.in b/simple-ccsm.in
index 4e74929..c5c225b 100755
--- a/simple-ccsm.in
+++ b/simple-ccsm.in
@@ -1309,6 +1309,12 @@ class MainWin:
# Create a file that indicates wether compiz is enabled or not
path = os.path.expanduser("~/.config/compiz/enable-compiz")
open(path, "w+").close() # touch replacement
+
+ path = os.path.expanduser("~/.config/compiz/disable-compiz")
+ try:
+ os.remove(path)
+ except (IOError, OSError):
+ pass
else:
fallbackWM = ""
if GnomeSession in os.environ and os.environ[GnomeSession]:
@@ -1328,11 +1334,18 @@ class MainWin:
except (IOError, OSError):
pass
+ # Create a file that indicates compiz is explicitly disabled, so should not be started
+ path = os.path.expanduser("~/.config/compiz/disable-compiz")
+ open(path, "w+").close() # touch replacement
+
# Remove old config
files = ("~/.config/compiz/enable-compiz", "~/.config/compiz/compiz-manager")
for file in files:
path = os.path.expanduser(file)
- os.remove(path)
+ try:
+ os.remove(path)
+ except (IOError, OSError):
+ pass
self.Notebook.set_sensitive(enabled)
self.ProfileChooser.set_sensitive(enabled)