[openbox] Patch to fix Epist's buggy 2D workspace

Scott Moynes smoynes at nexus.carleton.ca
Wed Oct 30 12:07:00 EST 2002


* Ava Arachne Jarvis (ajar at katanalynx.dyndns.org) wrote:
> You can do cycling through rows with cycleWorkspace, but I think that
> unless you allow arithmetic operations in the conf file, you can not
> cycle through columns (e.g., remain on the same row).

How is the cycle column not the behaviour you expect, other than the
bug fix below?

> 1. Looking at the patch:
> 
>    -    { "nextworkspacerow", Action::upWorkspace },
>    -    { "prevworkspacerow", Action::downWorkspace },
>    +    { "nextworkspacerow", Action::downWorkspace },
>    +    { "prevworkspacerow", Action::upWorkspace },

This appears to be purely semantic. The interpretation here is based
on the numbering of the workspaces, and I think matches the layout of
bbpager. However, this brings up an interesting aside: the grid stuff
has to support the recent NETWM revision that specifies this sort of
behaviour. What pager are you using? I'm not clear why this isn't
expected.

> 3. The third one, however, is a very obvious bugfix for the case where 
>    one is cycling through columns leftwards on a full row:
> 
>       if (num < 0) {
>         if (active_desktop % width != 0)
>    -      changeWorkspace(active_desktop - 1);   <-- called correctly
>    +      wnum = active_desktop - 1;             <-- should have been this
>         else {
>           wnum = active_desktop + width - 1;
>           if (wnum >= num_desktops)
>    @@ -761,6 +743,7 @@
>         else
>           wnum = active_desktop - width + 1;
>       }
>    +
>       changeWorkspace(wnum);                 <-- called 2nd time with unitialized 
>                                                  value in original version
>     }

I'm sorry, I should have reserved comment on this until I could get
home and test it properly. Also, until I wasn't so drunk. That's
pretty obvious.

-- 
Scott Moynes http://www.icculus.org/openbox/
"Computer science is as much about computers
as astronomy is about telescopes." -- Dijkstra
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://icculus.org/pipermail/openbox/attachments/20021030/a681bc44/attachment.pgp>


More information about the openbox mailing list