Bug 12663 - Decorator command not run at startup
Summary: Decorator command not run at startup
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: App/compiz (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Reveman
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-03 09:17 UTC by Colin Guthrie
Modified: 2018-06-12 19:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Fix to ignore return value of the string setting (382 bytes, patch)
2007-10-03 09:20 UTC, Colin Guthrie
no flags Details | Splinter Review
Better patch (388 bytes, patch)
2007-10-03 09:40 UTC, Colin Guthrie
no flags Details | Splinter Review

Description Colin Guthrie 2007-10-03 09:17:31 UTC
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.
Comment 1 Colin Guthrie 2007-10-03 09:20:53 UTC
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
Comment 2 Colin Guthrie 2007-10-03 09:40:00 UTC
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.
Comment 3 Colin Guthrie 2007-10-04 15:12:57 UTC
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.
Comment 4 Colin Guthrie 2007-10-04 15:13:11 UTC
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.
Comment 5 Colin Guthrie 2007-10-04 15:13:39 UTC
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.
Comment 6 Adam Jackson 2018-06-12 19:08:19 UTC
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.