diff --git a/src/lib/gtkui/configwindow.py b/src/lib/gtkui/configwindow.py
index <HASH>..<HASH> 100644
--- a/src/lib/gtkui/configwindow.py
+++ b/src/lib/gtkui/configwindow.py
@@ -1316,7 +1316,10 @@ close and reopen the AutoKey window.\nThis message is only shown once per sessio
         dlg.destroy()
     
     def on_treeWidget_row_activated(self, widget, path, viewColumn, data=None):
-        widget.expand_row(path, False)
+        if widget.row_expanded(path):
+            widget.collapse_row(path)
+        else:
+            widget.expand_row(path, False)
         
     def on_treeWidget_row_collapsed(self, widget, tIter, path, data=None):
         widget.columns_autosize()
diff --git a/src/lib/interface.py b/src/lib/interface.py
index <HASH>..<HASH> 100644
--- a/src/lib/interface.py
+++ b/src/lib/interface.py
@@ -219,7 +219,7 @@ class XInterfaceBase(threading.Thread):
             lines = output.splitlines()
             
             for line in lines:
-                if "gnome-shell" in line or "cinnamon" in line:
+                if "gnome-shell" in line or "cinnamon" in line or "unity" in line:
                     return True
         except:
             pass # since this is just a nasty workaround, if anything goes wrong just disable it
Add Unity to the list of environments messing with the Super key
[GTK] Enable toggling of row collapse/expand status


git-svn-id: <URL>