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

Ava Arachne Jarvis ajar at katanalynx.dyndns.org
Wed Oct 30 11:46:00 EST 2002


[Scott Moynes - Wed, 30 Oct 2002 06:51:30 AM CST]
> The behaviour you are looking for is possible using the numeric
> argument to the cycleWorkspace action. 

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).


> The behaviour that currently exists is to have some sane cycling when
> using a non-square workspace grid. ie, when on workspace 3 of a grid
> with 5 workspaces and 3 in the first row going to the next row would
> put you on workspace 5.

No, the behaviour that currently exists is buggy.  

1. Looking at the patch:

   -    { "nextworkspacerow", Action::upWorkspace },
   -    { "prevworkspacerow", Action::downWorkspace },
   +    { "nextworkspacerow", Action::downWorkspace },
   +    { "prevworkspacerow", Action::upWorkspace },

  Mixed up Up and Down.  Nothing to do with cycling yet.

2. The second one, I agree, is probably not the same as cycleWorkspace 
   with a dud last row.

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
    }



-- 
| Swap read error.  You lose your mind.



More information about the openbox mailing list