Hi, I've been trying to use the option in the decorator plugin to run the decorator of choice automatically when compiz starts. Unf there is a bug in the current compiz decorator plugin, incl 0.6, that prevents it from working properly. Currently it "if (compSetStringOption (o, value))" around where the option is set. This function call will return false if the option does not change (which is the case at startup) and thus when compiz is launched, the decorator does not fire up. The only time the decorator will run is when you edit the options value which is not particularly useful. I have now made good use of this option (after my patch) as it fixes an issue with Gnome session saving where the decorator was not started when the session was restored.
Created attachment 11879 [details] [review] Fix to ignore return value of the string setting This is not a final patch but it illustrates the point. This just adds a "|| TRUE" into the if statement but the final solution should be to remove the whole if() statement completely. A check further down will prevent the decorator command from being run if a decorator is already running. I have tested the behaviour and with the patch applied it seems to work as you'd expect (e.g. usefully!). The only reason I didn't remove the whole if statement is that I can't quite work out the indentation style at first glance (it's bizarre to me!), so I didn't want ot mess it up. It will take someone who is applying this seconds to adapt, so I figured it's was not worth me doing it badly! Cheers
Created attachment 11880 [details] [review] Better patch This is a better patch. 1) I noticed the tabs and spaces combo in the file so the indentation seemed normal. 2) I realised there was a potential null string issue that this latest patch checks for.
As maniac103 103 pointed out to me this patch does not fix things 100%. It works when using ccp as a config backend but does not work if compiz starts without any config backend. I will attempt to write a better patch.
Mass closure: This bug has been untouched for more than six years, and is not obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.