[openbox] Directional switching

Mikael Magnusson mikachu at gmail.com
Thu Jul 9 01:20:13 EDT 2015


On Thu, Jul 9, 2015 at 7:12 AM, Ian Zimmerman <itz at buug.org> wrote:
> On 2015-07-09 05:34 +0200, Mikael Magnusson wrote:
>
>> You'll want to initialize these integers to something in
>> config_startup(), then you don't need the elses during parsing.
>
> Is config_startup called during live reconfiguration?

Yes, your config values aren't the only ones that don't break during
reconfiguration :).

>> Would I be correct in thinking that setting one to two is equivalent
>> to setting the other to one half? (If they were not integers).
>
> Yes, it is equivalent mathematically; depending on how it's implemented,
> there may be some loss of precision with a single parameter (if it's
> used to multiply and then divide).  That is probably negligible.  But I
> also believe two parameters are clearer in this case.  What would you
> call the single relative parameter?
>
> Thanks for your comments, I really appreciate the opportunity to improve
> the code!

I'm not sure either, it just seemed more reasonable to configure a
single ratio, than two values that are really just one value that
cancel each other out if you increase both. AngleToDistanceRatio? :)

-- 
Mikael Magnusson


More information about the openbox mailing list