[openbox] Direction focus algorithm
danakj at orodu.net
Thu Aug 9 18:21:17 EDT 2007
I think it's based on edges, and in that case 1->2 doesn't happen cuz
1 is past the edge of 2. I didn't write that algorithm, a comment
says its from fvwm, and it's not the same algorithm used for finding
window edges for moving and stuff, but maybe it should be. That one
finds both the front and back edges of windows.
On 8/9/07, Clay Barnes <clay at hci-matters.com> wrote:
> I haven't use the most recent build of OB3 yet, so this may have
> changed, but I've noticed a few strange focus patterns with
> DireectionFocus(N|S|E|W), including that if you focus across a couple
> apps in one direction, but try to go back the other direction, they
> don't always traverse the same windows. Don't get me wrong, it does
> very well most of the time, I'm just trying to figure out what's
> causing the issue.
> Example of case where the issue arises:
> | 2| 3|
> | | |
> | | |
> >--. | |
> | 1| | |
> Select goes west from 3 to 2 to 1, but when going east goes straight
> from 1 to 3.
> My question is, is window selection based on the center of the window
> or the edges? I suspect it's center-based, because then I can imagine
> that 2's center is too "diagonal" to get hit from 1. However, it
> seems like there might be a slightly less quirky way to design this.
> (Going east/west, the next center (considering only the X ordinate)
> would always be the next selected, and if several are the same X (+/-
> some % of the screen to keep 1-pixel shifts from dictating the order),
> the one with the closest Y ordinate would be selected, for example.
> Or something that considers edges, etc.)
> I'll think about algorithms in case you decide to change anything. I
> know it's a low priority, though, since it's already good and changes
> might have a lot of unexpected consequences.
> Clay Barnes
> GPG Public Key:
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> -----END PGP SIGNATURE-----
More information about the openbox