[openbox] Directional switching

Mikael Magnusson mikachu at gmail.com
Wed Jul 8 23:34:32 EDT 2015


On Thu, Jul 9, 2015 at 1:02 AM, Ian Zimmerman <itz at buug.org> wrote:
> On 2015-07-07 13:17 -0700, Ian Zimmerman wrote:
>
>> The 2 and 5 could/should be rc.xml parameters.  With defaults 1 and 1
>> you'd have the current behavior.  Is there interest in me pursuing that
>> path and providing a more complete patch?
>
> Not much interest, but here it is anyway.  I want to be on record as
> using this feature to its full extent, and if necessary maintaining it.

You'll want to initialize these integers to something in
config_startup(), then you don't need the elses during parsing.

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). If so,
you use probably config_parse_relative_number(), then you can set both
of them from one number in rc.xml given as 3/5 instead. (You probably
need to init denom to 1 yourself). (And yes, I know they're called
rational numbers, the relative is because they were used for
screen-relative coordinates). :)

-- 
Mikael Magnusson


More information about the openbox mailing list