(unknown charset) Re: FVWM: Scroll behavior questions again

From: (unknown charset) Louis LeBlanc <fvwm_at_keyslapper.org>
Date: Sat, 18 Jan 2003 21:26:59 -0500

On 01/17/03 05:14 PM, Louis LeBlanc sat at the `puter and typed:
> Hey again. I've been trying this a dozen different ways, but I can't
> get the keystroke wraparound behavior to work right.
>
> This is what I'm using in my .fvwm2rc:
>
> Key h A 4 Scroll +0 -200000
> Key l A 4 Scroll +0 +200000
> Key k A 4 Scroll +300000 +0
> Key j A 4 Scroll +300000 +0
>
> My desktop size is 3x2. The EdgeScroll behavior is what I want as
> follows:
> EdgeScroll 100000 100000
> but I don't really care for the mouse. It's a necessary evil at best.
>
> When I scroll off the right of the right top page with the
> mouse, it goes to the left top page. That works right, but the
> Scroll behavior is different. Using Scroll -100000 +0 from the top
> left page goes instead to the bottom right. So, it was suggested that
> I instead use the
> Scroll +0 -200000
> call to achieve the same thing. And I've examined the numbers and
> geometry a hundred times, but the
> Scroll +0 -200000
> doesn't work. I've even tried using
> Scroll +0 +400000
> which should do the same thing. No good.
>
> The <WIN>-<l|k|j> key definitions work exactly as expected. Is it
> possible that there is an off by one error in the Scroll behavior
> somewhere in the Fvwm2 code involving the vertical scroll behavior?
> Just curious if anyone else is doing this or seeing this problem, or
> if anyone has any ideas how to fix this in the config.
>
> I don't expect it to make any difference, but it seems to me that the
> scrolling behavior should be the same for the mouse and the keyboard.
> There's a lot to be said for consistency, and it would be easier if
> the code from one piece could be reused in another somehow.
> Personally, I prefer the mouse behavior for the common method, but
> some people may prefer the opposite. Maybe it should be Yet Another
> Configuration Parameter. Just my $0.02
>
> Thanks
> Lou
> --
> Louis LeBlanc leblanc_at_keyslapper.org
> Fully Funded Hobbyist, KeySlapper Extrordinaire :)
> http://www.keyslapper.org ԿԬ
>
> Is knowledge knowable? If not, how do we know that?
> --
> Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
> To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
> message to majordomo_at_fvwm.org.
> To report problems, send mail to fvwm-owner_at_fvwm.org.
>
>

Ok, I LOVE open source. I never got an answer about this question, so
this evening I thought I'd take a look and see how difficult it would
be to change/repair/break the Scroll behavior. Pretty simple. Looks
like this is one of those well designed easily supported apps.
Nice job folks!

Just in case anyone is curious, here's the diff for /fvwm/virtual.c:

*** work/fvwm-2.4.14/fvwm/virtual.c Thu Mar 7 14:37:11 2002
--- virtual.c Sat Jan 18 21:14:46 2003
***************
*** 1485,1498 ****
--- 1485,1502 ----
      int xpixels = (Scr.VxMax / Scr.MyDisplayWidth + 1) *
Scr.MyDisplayWidth;
      x %= xpixels;
+ /*
      y += Scr.MyDisplayHeight * (1+((x-Scr.VxMax-1)/xpixels));
      if(y > Scr.VyMax)
        y %= (Scr.VyMax / Scr.MyDisplayHeight + 1) *
Scr.MyDisplayHeight;
+ */
    }
    if(((val1 <= -100000)||(val1 >= 100000))&&(x<0))
    {
      x = Scr.VxMax;
+ /*
      y -= Scr.MyDisplayHeight;
      if(y < 0)
        y=Scr.VyMax;
+ */
    }
    if(((val2 <= -100000)||(val2>= 100000))&&(y>Scr.VyMax))
***************
*** 1501,1514 ****
--- 1505,1522 ----
        Scr.MyDisplayHeight;
      y %= ypixels;
+ /*
      x += Scr.MyDisplayWidth * (1+((y-Scr.VyMax-1)/ypixels));
      if(x > Scr.VxMax)
        x %= (Scr.VxMax / Scr.MyDisplayWidth + 1) *
Scr.MyDisplayWidth;
+ */
    }
    if(((val2 <= -100000)||(val2>= 100000))&&(y<0))
    {
      y = Scr.VyMax;
+ /*
      x -= Scr.MyDisplayWidth;
      if(x < 0)
        x=Scr.VxMax;
+ */
    }
    MoveViewport(x,y,True);


Now my keystroke scrolling works exactly the same as the mouse
scrolling. Just what I wanted. I wonder how easy it would be to get
a custom change into any M$ product???? I won't hold my breath.

Pretty simple to figure out that if I was scrolling in the X
coordinate, I didn't want to scroll in the Y coordinate and visa
versa. So I simply commented these out. Would it be too much to ask
this to be made into a configurable feature? Maybe setting
SphericalScroll to nonzero makes it work like this, while the default
stays the same as before?

Either way, now my keystroke settings are back to the 100000 range:
Key h A 4 Scroll -100000 +0
Key l A 4 Scroll +100000 +0
Key k A 4 Scroll +0 -100000
Key j A 4 Scroll +0 +100000

Thanks all.
Lou
-- 
Louis LeBlanc               leblanc_at_keyslapper.org
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     ԿԬ
The Beatles:
  Paul McCartney's old back-up band.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sat Jan 18 2003 - 20:28:51 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:54 BST