Description: Register with session before loading plugins We would like to restart if a crash happens during plugin load for any reason. Author: Rob Taylor Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/729597 --- compiz-0.9.4git20110322.orig/src/main.cpp +++ compiz-0.9.4git20110322/src/main.cpp @@ -205,6 +205,19 @@ CompManager::init () if (!modHandler) return false; + if (!disableSm) + { + if (clientId == NULL) + { + char *desktop_autostart_id = getenv ("DESKTOP_AUTOSTART_ID"); + if (desktop_autostart_id != NULL) + clientId = strdup (desktop_autostart_id); + unsetenv ("DESKTOP_AUTOSTART_ID"); + } + CompSession::init (clientId); + } + + if (!plugins.empty ()) { CompOption::Value::Vector list; @@ -229,18 +242,6 @@ CompManager::init () if (!screen->init (displayName)) return false; - if (!disableSm) - { - if (clientId == NULL) - { - char *desktop_autostart_id = getenv ("DESKTOP_AUTOSTART_ID"); - if (desktop_autostart_id != NULL) - clientId = strdup (desktop_autostart_id); - unsetenv ("DESKTOP_AUTOSTART_ID"); - } - CompSession::init (clientId); - } - return true; }